aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu
diff options
context:
space:
mode:
authorMichael Straube <straube.linux@gmail.com>2018-12-05 19:30:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-06 16:12:19 +0100
commit4fea3f99b54aef2814e48ea0ff6bff37ea156727 (patch)
tree3ae644e30b4cb1f85a7f46235341254189a87f1d /drivers/staging/rtl8188eu
parentstaging: rtl8188eu: write out multiplying in wifirate2_ratetbl_inx() (diff)
downloadlinux-dev-4fea3f99b54aef2814e48ea0ff6bff37ea156727.tar.xz
linux-dev-4fea3f99b54aef2814e48ea0ff6bff37ea156727.zip
staging: rtl8188eu: replace if else with ternary operator
Replace if else with a single call and ternary operator to slightly reduce object file size. Also clears a checkpatch warning: WARNING: Statements should start on a tabstop Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_wlan_util.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
index 7af3dd910c93..9a20faad96c9 100644
--- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
@@ -1440,10 +1440,9 @@ void update_wireless_mode(struct adapter *padapter)
rtw_hal_set_hwreg(padapter, HW_VAR_RESP_SIFS, (u8 *)&SIFS_Timer);
- if (pmlmeext->cur_wireless_mode & WIRELESS_11B)
- update_mgnt_tx_rate(padapter, IEEE80211_CCK_RATE_1MB);
- else
- update_mgnt_tx_rate(padapter, IEEE80211_OFDM_RATE_6MB);
+ update_mgnt_tx_rate(padapter,
+ pmlmeext->cur_wireless_mode & WIRELESS_11B ?
+ IEEE80211_CCK_RATE_1MB : IEEE80211_OFDM_RATE_6MB);
}
void update_bmc_sta_support_rate(struct adapter *padapter, u32 mac_id)