rtl8188eu: Fix regression introduced in commit fb786d0

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-10 16:02:38 -05:00
parent fe06a8b006
commit 7d0f8ec86a

View file

@ -3266,9 +3266,9 @@ void rtw_joinbss_reset(_adapter *padapter)
/* the fucntion is >= passive_level */ /* the fucntion is >= passive_level */
unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len) unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len)
{ {
u32 ielen; u32 ielen, out_len;
HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor; HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor;
unsigned char *p; unsigned char *p, *pframe;
struct rtw_ieee80211_ht_cap ht_capie; struct rtw_ieee80211_ht_cap ht_capie;
unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00}; unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -3280,11 +3280,19 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12); p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12);
if (p && ielen>0) { if (p && ielen>0)
if (pqospriv->qos_option == 0) { {
if (pqospriv->qos_option == 0)
{
out_len = *pout_len;
pframe = rtw_set_ie(out_ie+out_len, _VENDOR_SPECIFIC_IE_,
_WMM_IE_Length_, WMM_IE, pout_len);
pqospriv->qos_option = 1; pqospriv->qos_option = 1;
} }
out_len = *pout_len;
_rtw_memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap)); _rtw_memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap));
ht_capie.cap_info = IEEE80211_HT_CAP_SUP_WIDTH |IEEE80211_HT_CAP_SGI_20 | ht_capie.cap_info = IEEE80211_HT_CAP_SUP_WIDTH |IEEE80211_HT_CAP_SGI_20 |
@ -3321,11 +3329,29 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&(0x07<<2)); ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&(0x07<<2));
else else
ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x00); ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x00);
pframe = rtw_set_ie(out_ie+out_len, _HT_CAPABILITY_IE_,
sizeof(struct rtw_ieee80211_ht_cap), (unsigned char*)&ht_capie, pout_len);
/* _rtw_memcpy(out_ie+out_len, p, ielen+2);//gtest */
/* pout_len = *pout_len + (ielen+2); */
phtpriv->ht_option = true; phtpriv->ht_option = true;
p = rtw_get_ie(in_ie+12, _HT_ADD_INFO_IE_, &ielen, in_len-12); p = rtw_get_ie(in_ie+12, _HT_ADD_INFO_IE_, &ielen, in_len-12);
if (p && (ielen==sizeof(struct ieee80211_ht_addt_info)))
{
out_len = *pout_len;
pframe = rtw_set_ie(out_ie+out_len, _HT_ADD_INFO_IE_, ielen, p+2 , pout_len);
}
} }
return (phtpriv->ht_option); return (phtpriv->ht_option);
} }
/* the fucntion is > passive_level (in critical_section) */ /* the fucntion is > passive_level (in critical_section) */