staging: rtl8723au: Use _FIXED_IE_LEN_ instead of hard coded value

This should help catching all the users once we stop carrying the
fixed beacon elements in the IE array.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jes Sorensen 2014-06-24 15:03:22 +02:00 committed by Greg Kroah-Hartman
parent 51a26d26fe
commit e61fc7cf90
2 changed files with 9 additions and 7 deletions

View File

@ -1929,7 +1929,7 @@ int rtw_restruct_wmm_ie23a(struct rtw_adapter *adapter, u8 *in_ie,
unsigned int ielength = 0;
unsigned int i, j;
i = 12; /* after the fixed IE */
i = _FIXED_IE_LENGTH_; /* after the fixed IE */
while (i < in_len) {
ielength = initial_out_len;
@ -2039,8 +2039,8 @@ int rtw_restruct_sec_ie23a(struct rtw_adapter *adapter, u8 *in_ie, u8 *out_ie,
"ndissecuritytype=%d\n", ndisauthmode, ndissecuritytype));
/* copy fixed ie only */
memcpy(out_ie, in_ie, 12);
ielength = 12;
memcpy(out_ie, in_ie, _FIXED_IE_LENGTH_);
ielength = _FIXED_IE_LENGTH_;
if (ndisauthmode == Ndis802_11AuthModeWPA ||
ndisauthmode == Ndis802_11AuthModeWPAPSK)
authmode = WLAN_EID_VENDOR_SPECIFIC;
@ -2171,7 +2171,8 @@ bool rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
phtpriv->ht_option = false;
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, in_ie + 12, in_len -12);
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, in_ie + _FIXED_IE_LENGTH_,
in_len - _FIXED_IE_LENGTH_);
if (p && p[1] > 0) {
u32 rx_packet_offset, max_recvbuf_sz;
@ -2216,8 +2217,9 @@ bool rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
phtpriv->ht_option = true;
p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, in_ie + 12,
in_len -12);
p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
in_ie + _FIXED_IE_LENGTH_,
in_len - _FIXED_IE_LENGTH_);
if (p && (p[1] == sizeof(struct ieee80211_ht_operation))) {
out_len = *pout_len;
pframe = rtw_set_ie23a(out_ie + out_len,

View File

@ -4254,7 +4254,7 @@ static struct wlan_bssid_ex *collect_bss_info(struct rtw_adapter *padapter,
memcpy(bssid->SupportedRates + i, p + 2, p[1]);
}
if (bssid->IELength < 12)
if (bssid->IELength < _FIXED_IE_LENGTH_)
goto fail;
/* Checking for DSConfig */