diff options
author | Bhanusree Pola <bhanusreemahesh@gmail.com> | 2018-10-23 16:27:26 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-05 14:16:32 +0100 |
commit | 2c66f2a9efd9cdba235e9d41de544e23ccdb8700 (patch) | |
tree | 84a0065a641ea95181a6315f8ee893726ac83346 /drivers/staging/rtlwifi | |
parent | staging: gasket: use sizeof(*p) for memory allocation (diff) | |
download | wireguard-linux-2c66f2a9efd9cdba235e9d41de544e23ccdb8700.tar.xz wireguard-linux-2c66f2a9efd9cdba235e9d41de544e23ccdb8700.zip |
Staging: rtlwifi: Remove Unneeded funition halbtc_get_wifi_rssi()
In the function halbtc_get_wifi_rssi:
1.if and else are functionally identical as they assign same value to
variable 'undec_sm_pwdb'.
2.Variable 'undec_sm_pwdb' not required to just return a single value.
3.Function not needed to just return a value and so removed the function
and assigned value rtlpriv->dm.undec_sm_pwdb where the function
halbtc_get_wifi_rssi() is called.
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtlwifi')
-rw-r--r-- | drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c index 24e19ffd4431..b519d181b419 100644 --- a/drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c +++ b/drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c @@ -476,17 +476,6 @@ static u32 halbtc_get_wifi_link_status(struct btc_coexist *btcoexist) return ret_val; } -static s32 halbtc_get_wifi_rssi(struct rtl_priv *rtlpriv) -{ - int undec_sm_pwdb = 0; - - if (rtlpriv->mac80211.link_state >= MAC80211_LINKED) - undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb; - else /* associated entry pwdb */ - undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb; - return undec_sm_pwdb; -} - static bool halbtc_get(void *void_btcoexist, u8 get_type, void *out_buf) { struct btc_coexist *btcoexist = (struct btc_coexist *)void_btcoexist; @@ -585,7 +574,7 @@ static bool halbtc_get(void *void_btcoexist, u8 get_type, void *out_buf) *bool_tmp = false; break; case BTC_GET_S4_WIFI_RSSI: - *s32_tmp = halbtc_get_wifi_rssi(rtlpriv); + *s32_tmp = rtlpriv->dm.undec_sm_pwdb; break; case BTC_GET_S4_HS_RSSI: *s32_tmp = 0; |