Remove OUI_MICROSOFT and use the value from kernel

This commit is contained in:
Carlos Garces 2021-10-14 21:26:34 +02:00
parent 3264bb634a
commit 4032543691
3 changed files with 3 additions and 7 deletions

View File

@ -1897,7 +1897,6 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
u8 mfp_opt = MFP_NO; u8 mfp_opt = MFP_NO;
u8 channel, network_type, supportRate[NDIS_802_11_LENGTH_RATES_EX]; u8 channel, network_type, supportRate[NDIS_802_11_LENGTH_RATES_EX];
int supportRateNum = 0; int supportRateNum = 0;
u8 OUI1[] = {0x00, 0x50, 0xf2, 0x01};
u8 WMM_PARA_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01}; u8 WMM_PARA_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};
HT_CAP_AMPDU_DENSITY best_ampdu_density; HT_CAP_AMPDU_DENSITY best_ampdu_density;
struct registry_priv *pregistrypriv = &padapter->registrypriv; struct registry_priv *pregistrypriv = &padapter->registrypriv;
@ -2133,7 +2132,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
psecuritypriv->wpa_pairwise_cipher = _NO_PRIVACY_; psecuritypriv->wpa_pairwise_cipher = _NO_PRIVACY_;
for (p = ie + _BEACON_IE_OFFSET_; ; p += (ie_len + 2)) { for (p = ie + _BEACON_IE_OFFSET_; ; p += (ie_len + 2)) {
p = rtw_get_ie(p, _SSN_IE_1_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2))); p = rtw_get_ie(p, _SSN_IE_1_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2)));
if ((p) && (_rtw_memcmp(p + 2, OUI1, 4))) { if ((p) && (_rtw_memcmp(p + 2, RTW_WPA_OUI, 4))) {
if (rtw_parse_wpa_ie(p, ie_len + 2, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS) { if (rtw_parse_wpa_ie(p, ie_len + 2, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS) {
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
psecuritypriv->ndisauthtype = Ndis802_11AuthModeWPAPSK; psecuritypriv->ndisauthtype = Ndis802_11AuthModeWPAPSK;

View File

@ -588,7 +588,6 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
{ {
int len; int len;
u16 val16; u16 val16;
unsigned char wpa_oui_type[] = {0x00, 0x50, 0xf2, 0x01};
u8 *pbuf = pie; u8 *pbuf = pie;
int limit_new = limit; int limit_new = limit;
@ -598,7 +597,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
if (pbuf) { if (pbuf) {
/* check if oui matches... */ /* check if oui matches... */
if (_rtw_memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type)) == _FALSE) if (_rtw_memcmp((pbuf + 2), RTW_WPA_OUI_TYPE, sizeof(RTW_WPA_OUI_TYPE)) == _FALSE)
goto check_next_ie; goto check_next_ie;
@ -1211,7 +1210,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
oui = RTW_GET_BE24(pos); oui = RTW_GET_BE24(pos);
switch (oui) { switch (oui) {
case OUI_MICROSOFT: case WLAN_OUI_MICROSOFT:
/* Microsoft/Wi-Fi information elements are further typed and /* Microsoft/Wi-Fi information elements are further typed and
* subtyped */ * subtyped */
switch (pos[3]) { switch (pos[3]) {

View File

@ -1550,8 +1550,6 @@ enum rtw_ieee80211_wnm_actioncode {
}; };
#endif #endif
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
* 00:50:F2 */
#define WME_OUI_TYPE 2 #define WME_OUI_TYPE 2
#define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0 #define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0