summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2015-09-22 23:50:38 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 04:27:22 +0200
commitf62cd2cd95ef05f125c57d4905deff81a504682e (patch)
tree36cec6a8b13bcc2ee0c24edff6ace7fa0c4be9c6 /drivers
parent3e4e8e025c374959538d37a812a7c20f7aa8a5c1 (diff)
downloadlinux-f62cd2cd95ef05f125c57d4905deff81a504682e.tar.bz2
staging: rtl8188eu: issue_action_BA(): extract ADDBA_req pointer
pmlmeinfo->ADDBA_req is accessed three times in this function, but it contributes to generating lines above 80 characters that are not easy to split in a nice way. Extract a pointer to it to make code slightly more concise and fix some lines over 80 characters. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_mlme_ext.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index e31eae9b0583..0270755ec546 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -1719,13 +1719,17 @@ static void issue_action_BA(struct adapter *padapter, unsigned char *raddr,
&pattrib->pktlen);
break;
case 1: /* ADDBA rsp */
+ {
+ struct ADDBA_request *ADDBA_req = &pmlmeinfo->ADDBA_req;
+
pframe = rtw_set_fixed_ie(pframe, 1,
- &pmlmeinfo->ADDBA_req.dialog_token,
+ &ADDBA_req->dialog_token,
&pattrib->pktlen);
pframe = rtw_set_fixed_ie(pframe, 2, &status,
&pattrib->pktlen);
- BA_para_set = le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f;
+ BA_para_set = le16_to_cpu(ADDBA_req->BA_para_set) &
+ 0x3f;
rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
switch (max_rx_ampdu_factor) {
case MAX_AMPDU_FACTOR_64K:
@@ -1754,9 +1758,10 @@ static void issue_action_BA(struct adapter *padapter, unsigned char *raddr,
pframe = rtw_set_fixed_ie(pframe, 2, &(le_tmp),
&pattrib->pktlen);
pframe = rtw_set_fixed_ie(pframe, 2,
- &pmlmeinfo->ADDBA_req.BA_timeout_value,
+ &ADDBA_req->BA_timeout_value,
&pattrib->pktlen);
break;
+ }
case 2:/* DELBA */
BA_para_set = (status & 0x1F) << 3;
le_tmp = cpu_to_le16(BA_para_set);