From 1d33b0766385957c0e70ff32ec501d1f775c8316 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Tue, 24 Jun 2014 15:03:19 +0200 Subject: [PATCH] staging: rtl8723au: rtw_get_cur_max_rate(): Use _FIXED_IE_LENGTH_ instead of hardcoded value Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index ebb98a04d5c8..9584688a5e9d 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -1190,8 +1190,9 @@ static u16 rtw_get_cur_max_rate(struct rtw_adapter *adapter) u8 bw_40MHz = 0, short_GI_20 = 0, short_GI_40 = 0; u16 mcs_rate = 0; - p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, &pcur_bss->IEs[12], - pcur_bss->IELength - 12); + p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, + &pcur_bss->IEs[_FIXED_IE_LENGTH_], + pcur_bss->IELength - _FIXED_IE_LENGTH_); if (p && p[1] > 0) { pht_capie = (struct ieee80211_ht_cap *)(p + 2); -- 2.34.1