Commit f8126e4f authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman
Browse files

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: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200929062847.23985-6-straube.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 00a367bc
Loading
Loading
Loading
Loading
+4 −30
Original line number Diff line number Diff line
@@ -53,32 +53,6 @@ static const u8 rtw_basic_rate_mix[7] = {
	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)
{
	switch (network_type) {
@@ -111,9 +85,9 @@ u8 judge_network_type(struct adapter *padapter, unsigned char *rate, int ratelen
	if (pmlmeinfo->HT_enable)
		network_type = WIRELESS_11_24N;

	if (cckratesonly_included(rate, ratelen))
	if (rtw_is_cckratesonly_included(rate))
		network_type |= WIRELESS_11B;
	else if (cckrates_included(rate, ratelen))
	else if (rtw_is_cckrates_included(rate))
		network_type |= WIRELESS_11BG;
	else
		network_type |= WIRELESS_11G;
@@ -1362,9 +1336,9 @@ void update_wireless_mode(struct adapter *padapter)
	if (pmlmeinfo->HT_enable)
		network_type = WIRELESS_11_24N;

	if (cckratesonly_included(rate, ratelen))
	if (rtw_is_cckratesonly_included(rate))
		network_type |= WIRELESS_11B;
	else if (cckrates_included(rate, ratelen))
	else if (rtw_is_cckrates_included(rate))
		network_type |= WIRELESS_11BG;
	else
		network_type |= WIRELESS_11G;
+0 −3
Original line number Diff line number Diff line
@@ -568,9 +568,6 @@ void addba_timer_hdl(struct timer_list *t);
	mod_timer(&mlmeext->link_timer, jiffies +	\
		  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 update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);