Skip to content

Commit

Permalink
rtl8192du: Remove dead code for CONFIG_DISABLE_MCS13TO15
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
  • Loading branch information
lwfinger committed Jul 11, 2014
1 parent 94f5075 commit 181e5d2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 51 deletions.
16 changes: 0 additions & 16 deletions core/rtw_mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@
#include <rtw_mlme.h>
#include <linux/vmalloc.h>

#ifdef CONFIG_DISABLE_MCS13TO15
extern unsigned char MCS_rate_2R_MCS13TO15_OFF[16];
extern unsigned char MCS_rate_2R[16];
#else /* CONFIG_DISABLE_MCS13TO15 */
extern unsigned char MCS_rate_2R[16];
#endif /* CONFIG_DISABLE_MCS13TO15 */
extern unsigned char MCS_rate_1R[16];

int _rtw_init_mlme_priv(struct rtw_adapter *padapter)
Expand Down Expand Up @@ -2839,19 +2834,8 @@ void rtw_update_ht_cap(struct rtw_adapter *padapter, u8 *pie, uint ie_len,
pmlmeinfo->HT_caps.u.HT_cap_element.
MCS_rate[i] &= MCS_rate_1R[i];
} else {
#ifdef CONFIG_DISABLE_MCS13TO15
if (pmlmeext->cur_bwmode == HT_CHANNEL_WIDTH_40 &&
pregistrypriv->wifi_spec != 1) {
pmlmeinfo->HT_caps.u.HT_cap_element.
MCS_rate[i] &=
MCS_rate_2R_MCS13TO15_OFF[i];
} else
pmlmeinfo->HT_caps.u.HT_cap_element.
MCS_rate[i] &= MCS_rate_2R[i];
#else
pmlmeinfo->HT_caps.u.HT_cap_element.
MCS_rate[i] &= MCS_rate_2R[i];
#endif /* CONFIG_DISABLE_MCS13TO15 */
}
if (pregistrypriv->special_rf_path)
pmlmeinfo->HT_caps.u.HT_cap_element.
Expand Down
23 changes: 1 addition & 22 deletions core/rtw_mlme_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,11 @@ extern unsigned char REALTEK_96B_IE[];
/********************************************************
MCS rate definitions
*********************************************************/
#ifdef CONFIG_DISABLE_MCS13TO15
unsigned char MCS_rate_2R_MCS13TO15_OFF[16] = {
0xff, 0x1f, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0
};
unsigned char MCS_rate_2R[16] = {
0xff, 0xff, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0
};
#else /* CONFIG_DISABLE_MCS13TO15 */
unsigned char MCS_rate_2R[16] = {
0xff, 0xff, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0
};
#endif /* CONFIG_DISABLE_MCS13TO15 */

unsigned char MCS_rate_1R[16] = {
0xff, 0x00, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0
Expand Down Expand Up @@ -7104,19 +7094,8 @@ void issue_assocreq(struct rtw_adapter *adapt)
("declare supporting RX STBC\n");
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info |= cpu_to_le16(0x0200); /* RX STBC two spatial stream */
}
#ifdef CONFIG_DISABLE_MCS13TO15
if (pmlmeext->cur_bwmode == HT_CHANNEL_WIDTH_40 && (pregpriv->wifi_spec != 1))
memcpy(pmlmeinfo->HT_caps.u.
HT_cap_element.MCS_rate,
MCS_rate_2R_MCS13TO15_OFF, 16);
else
memcpy(pmlmeinfo->HT_caps.u.
HT_cap_element.MCS_rate,
MCS_rate_2R, 16);
#else /* CONFIG_DISABLE_MCS13TO15 */
memcpy(pmlmeinfo->HT_caps.u.HT_cap_element.
MCS_rate, MCS_rate_2R, 16);
#endif /* CONFIG_DISABLE_MCS13TO15 */
break;
}
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info =
Expand Down
12 changes: 2 additions & 10 deletions core/rtw_wlan_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,18 +875,10 @@ void HT_caps_handler(struct rtw_adapter *padapter, struct ndis_802_11_variable_i

/* update the MCS rates */
for (i = 0; i < 16; i++) {
if ((rf_type == RF_1T1R) || (rf_type == RF_1T2R)) {
if ((rf_type == RF_1T1R) || (rf_type == RF_1T2R))
pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_1R[i];
} else {
#ifdef CONFIG_DISABLE_MCS13TO15
if (pmlmeext->cur_bwmode == HT_CHANNEL_WIDTH_40 && (pregistrypriv->wifi_spec != 1))
pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_2R_MCS13TO15_OFF[i];
else
pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_2R[i];
#else
else
pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_2R[i];
#endif /* CONFIG_DISABLE_MCS13TO15 */
}
if (pregistrypriv->special_rf_path)
pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_1R[i];
}
Expand Down
3 changes: 0 additions & 3 deletions include/wifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1127,9 +1127,6 @@ enum P2P_PS_MODE
#define ICMPV6_MCAST_MAC(mac) ((mac[0]==0x33)&&(mac[1]==0x33)&&(mac[2]!=0xff))
extern unsigned char REALTEK_96B_IE[6];
extern unsigned char MCS_rate_2R[16];
#ifdef CONFIG_DISABLE_MCS13TO15
extern unsigned char MCS_rate_2R_MCS13TO15_OFF[16];
#endif /* CONFIG_DISABLE_MCS13TO15 */
extern unsigned char MCS_rate_1R[16];
extern unsigned char RTW_WPA_OUI[];
extern unsigned char WPA_TKIP_CIPHER[4];
Expand Down

0 comments on commit 181e5d2

Please sign in to comment.