Commit 072fc84d authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: tid is 4 bits, so we need a 16 bit value to hold a bitmap

Remove unused add_enable_bitmap and candidate_tid_bitmap from struct
mlme_ext_info.

In addition we don't need to use CHKBIT when we know we are dealing
with a value in the range 0-15.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 405c9f50
......@@ -2034,11 +2034,10 @@ static int OnAction23a_back23a(struct rtw_adapter *padapter,
tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
if (status == 0) { /* successful */
DBG_8723A("agg_enable for TID =%d\n", tid);
psta->htpriv.agg_enable_bitmap |= 1 << tid;
psta->htpriv.candidate_tid_bitmap &=
~CHKBIT(tid);
psta->htpriv.agg_enable_bitmap |= BIT(tid);
psta->htpriv.candidate_tid_bitmap &= ~BIT(tid);
} else
psta->htpriv.agg_enable_bitmap &= ~CHKBIT(tid);
psta->htpriv.agg_enable_bitmap &= ~BIT(tid);
break;
case WLAN_ACTION_DELBA: /* DELBA */
......@@ -2051,14 +2050,11 @@ static int OnAction23a_back23a(struct rtw_adapter *padapter,
preorder_ctrl->enable = false;
preorder_ctrl->indicate_seq = 0xffff;
} else {
psta->htpriv.agg_enable_bitmap &= ~(1 << tid);
psta->htpriv.candidate_tid_bitmap &=
~(1 << tid);
psta->htpriv.agg_enable_bitmap &= ~BIT(tid);
psta->htpriv.candidate_tid_bitmap &= ~BIT(tid);
}
reason_code = get_unaligned_le16(
&mgmt->u.action.u.delba.reason_code);
DBG_8723A("%s(): DELBA: %x(%x)\n", __func__,
pmlmeinfo->agg_enable_bitmap, reason_code);
/* todo: how to notify the host while receiving
DELETE BA */
break;
......@@ -5875,8 +5871,6 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
pmlmeinfo->HT_enable = 0;
pmlmeinfo->HT_caps_enable = 0;
pmlmeinfo->HT_info_enable = 0;
pmlmeinfo->agg_enable_bitmap = 0;
pmlmeinfo->candidate_tid_bitmap = 0;
/* disable dynamic functions, such as high power, DIG */
rtl8723a_odm_support_ability_backup(padapter);
......@@ -5944,8 +5938,6 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
pmlmeinfo->HT_enable = 0;
pmlmeinfo->HT_caps_enable = 0;
pmlmeinfo->HT_info_enable = 0;
pmlmeinfo->agg_enable_bitmap = 0;
pmlmeinfo->candidate_tid_bitmap = 0;
pmlmeinfo->bwmode_updated = false;
/* pmlmeinfo->assoc_AP_vendor = HT_IOT_PEER_MAX; */
......
......@@ -952,8 +952,13 @@ s32 rtw_make_wlanhdr23a(struct rtw_adapter *padapter, u8 *hdr,
SetSeqNum(hdr, pattrib->seqnum);
/* check if enable ampdu */
if (pattrib->ht_en && psta->htpriv.ampdu_enable) {
if (psta->htpriv.agg_enable_bitmap & CHKBIT(pattrib->priority))
pattrib->ampdu_en = true;
if (pattrib->priority >= 16)
printk(KERN_WARNING "%s: Invalid "
"pattrib->priority %i\n",
__func__, pattrib->priority);
if (psta->htpriv.agg_enable_bitmap &
BIT(pattrib->priority))
pattrib->ampdu_en = true;
}
/* re-check if enable ampdu by BA_starting_seqctrl */
if (pattrib->ampdu_en) {
......
......@@ -33,9 +33,9 @@ struct ht_priv
u8 sgi;/* short GI */
/* for processing Tx A-MPDU */
u8 agg_enable_bitmap;
u16 agg_enable_bitmap;
/* u8 ADDBA_retry_count; */
u8 candidate_tid_bitmap;
u16 candidate_tid_bitmap;
struct ieee80211_ht_cap ht_cap;
};
......
......@@ -357,9 +357,7 @@ struct mlme_ext_info
u8 turboMode_cts2self;
u8 turboMode_rtsen;
u8 SM_PS;
u8 agg_enable_bitmap;
u8 ADDBA_retry_count;
u8 candidate_tid_bitmap;
u8 dialogToken;
/* Accept ADDBA Request */
bool bAcceptAddbaReq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment