staging: rtl8188eu: remove cckrates{only}_included()
In rtw_ieee80211.c there are rtw_is_cckrates_included() and rtw_is_cckratesonly_included() which have the same functionality as cckrates_included() and cckrates_only_included() defined in rtw_wlan_util.c. Remove the functions from rtw_wlan_util.c and use those from rtw_ieee80211.c. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200929062847.23985-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
00a367bc45
commit
f8126e4f1d
@ -53,32 +53,6 @@ static const u8 rtw_basic_rate_mix[7] = {
|
|||||||
IEEE80211_OFDM_RATE_24MB | IEEE80211_BASIC_RATE_MASK
|
IEEE80211_OFDM_RATE_24MB | IEEE80211_BASIC_RATE_MASK
|
||||||
};
|
};
|
||||||
|
|
||||||
bool cckrates_included(unsigned char *rate, int ratelen)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < ratelen; i++) {
|
|
||||||
u8 r = rate[i] & 0x7f;
|
|
||||||
|
|
||||||
if (r == 2 || r == 4 || r == 11 || r == 22)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool cckratesonly_included(unsigned char *rate, int ratelen)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < ratelen; i++) {
|
|
||||||
u8 r = rate[i] & 0x7f;
|
|
||||||
|
|
||||||
if (r != 2 && r != 4 && r != 11 && r != 22)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned char networktype_to_raid(unsigned char network_type)
|
unsigned char networktype_to_raid(unsigned char network_type)
|
||||||
{
|
{
|
||||||
switch (network_type) {
|
switch (network_type) {
|
||||||
@ -111,9 +85,9 @@ u8 judge_network_type(struct adapter *padapter, unsigned char *rate, int ratelen
|
|||||||
if (pmlmeinfo->HT_enable)
|
if (pmlmeinfo->HT_enable)
|
||||||
network_type = WIRELESS_11_24N;
|
network_type = WIRELESS_11_24N;
|
||||||
|
|
||||||
if (cckratesonly_included(rate, ratelen))
|
if (rtw_is_cckratesonly_included(rate))
|
||||||
network_type |= WIRELESS_11B;
|
network_type |= WIRELESS_11B;
|
||||||
else if (cckrates_included(rate, ratelen))
|
else if (rtw_is_cckrates_included(rate))
|
||||||
network_type |= WIRELESS_11BG;
|
network_type |= WIRELESS_11BG;
|
||||||
else
|
else
|
||||||
network_type |= WIRELESS_11G;
|
network_type |= WIRELESS_11G;
|
||||||
@ -1362,9 +1336,9 @@ void update_wireless_mode(struct adapter *padapter)
|
|||||||
if (pmlmeinfo->HT_enable)
|
if (pmlmeinfo->HT_enable)
|
||||||
network_type = WIRELESS_11_24N;
|
network_type = WIRELESS_11_24N;
|
||||||
|
|
||||||
if (cckratesonly_included(rate, ratelen))
|
if (rtw_is_cckratesonly_included(rate))
|
||||||
network_type |= WIRELESS_11B;
|
network_type |= WIRELESS_11B;
|
||||||
else if (cckrates_included(rate, ratelen))
|
else if (rtw_is_cckrates_included(rate))
|
||||||
network_type |= WIRELESS_11BG;
|
network_type |= WIRELESS_11BG;
|
||||||
else
|
else
|
||||||
network_type |= WIRELESS_11G;
|
network_type |= WIRELESS_11G;
|
||||||
|
@ -568,9 +568,6 @@ void addba_timer_hdl(struct timer_list *t);
|
|||||||
mod_timer(&mlmeext->link_timer, jiffies + \
|
mod_timer(&mlmeext->link_timer, jiffies + \
|
||||||
msecs_to_jiffies(ms))
|
msecs_to_jiffies(ms))
|
||||||
|
|
||||||
bool cckrates_included(unsigned char *rate, int ratelen);
|
|
||||||
bool cckratesonly_included(unsigned char *rate, int ratelen);
|
|
||||||
|
|
||||||
void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr);
|
void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr);
|
||||||
|
|
||||||
void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);
|
void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);
|
||||||
|
Loading…
Reference in New Issue
Block a user