lkml.org 
[lkml]   [2018]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/8] staging: rtl8188eu: remove unused should_forbid_n_rate()
    Date
    The function should_forbid_n_rate() is never used, so remove it.
    Discovered by cppcheck.

    Signed-off-by: Michael Straube <straube.linux@gmail.com>
    ---
    .../staging/rtl8188eu/core/rtw_wlan_util.c | 35 -------------------
    .../staging/rtl8188eu/include/rtw_mlme_ext.h | 1 -
    2 files changed, 36 deletions(-)

    diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
    index 0fe35e141926..b9406583e501 100644
    --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
    +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
    @@ -1094,41 +1094,6 @@ unsigned int is_ap_in_tkip(struct adapter *padapter)
    }
    }

    -unsigned int should_forbid_n_rate(struct adapter *padapter)
    -{
    - u32 i;
    - struct ndis_802_11_var_ie *pIE;
    - struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
    - struct wlan_bssid_ex *cur_network = &pmlmepriv->cur_network.network;
    -
    - if (rtw_get_capability((struct wlan_bssid_ex *)cur_network) & WLAN_CAPABILITY_PRIVACY) {
    - for (i = sizeof(struct ndis_802_11_fixed_ie); i < cur_network->ie_length;) {
    - pIE = (struct ndis_802_11_var_ie *)(cur_network->ies + i);
    -
    - switch (pIE->ElementID) {
    - case _VENDOR_SPECIFIC_IE_:
    - if (!memcmp(pIE->data, RTW_WPA_OUI, 4) &&
    - ((!memcmp((pIE->data + 12), WPA_CIPHER_SUITE_CCMP, 4)) ||
    - (!memcmp((pIE->data + 16), WPA_CIPHER_SUITE_CCMP, 4))))
    - return false;
    - break;
    - case _RSN_IE_2_:
    - if ((!memcmp((pIE->data + 8), RSN_CIPHER_SUITE_CCMP, 4)) ||
    - (!memcmp((pIE->data + 12), RSN_CIPHER_SUITE_CCMP, 4)))
    - return false;
    - default:
    - break;
    - }
    -
    - i += (pIE->Length + 2);
    - }
    -
    - return true;
    - } else {
    - return false;
    - }
    -}
    -
    unsigned int is_ap_in_wep(struct adapter *padapter)
    {
    u32 i;
    diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
    index c072e1e25d61..ade68af15e04 100644
    --- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
    +++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
    @@ -534,7 +534,6 @@ unsigned char get_highest_rate_idx(u32 mask);
    int support_short_GI(struct adapter *padapter, struct ieee80211_ht_cap *caps);
    unsigned int is_ap_in_tkip(struct adapter *padapter);
    unsigned int is_ap_in_wep(struct adapter *padapter);
    -unsigned int should_forbid_n_rate(struct adapter *padapter);

    void report_join_res(struct adapter *padapter, int res);
    void report_survey_event(struct adapter *padapter,
    --
    2.18.0
    \
     
     \ /
      Last update: 2018-07-29 19:10    [W:2.993 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site