staging: rtl8723bs: remove useless variable rtw_AcceptAddbaReq
authorAastha Gupta <aastha.gupta4104@gmail.com>
Sun, 8 Oct 2017 04:54:56 +0000 (10:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Oct 2017 14:07:49 +0000 (16:07 +0200)
rtw_AcceptAddbaReq is a static variable, it is set once and never
modified. It is referenced only once, to assign its value to a member
of struct registry_priv.

Remove the variable, and move the meaningful part of the comment
near the declaration of the relevant field of struct registry_priv.

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/include/drv_types.h
drivers/staging/rtl8723bs/os_dep/os_intfs.c

index 6812dd0..32129ac 100644 (file)
@@ -177,6 +177,7 @@ struct registry_priv
        u8 bt_ampdu;
        s8      ant_num;
 
+       /* false:Reject AP's Add BA req, true:accept AP's Add BA req */
        bool    accept_addba_req;
 
        u8 antdiv_cfg;
index 7837915..fc5e3d4 100644 (file)
@@ -113,8 +113,6 @@ static int rtw_ant_num = -1; /*  <0: undefined, >0: Antenna number */
 module_param(rtw_ant_num, int, 0644);
 MODULE_PARM_DESC(rtw_ant_num, "Antenna number setting");
 
-static int rtw_AcceptAddbaReq = true;/*  0:Reject AP's Add BA req, 1:Accept AP's Add BA req. */
-
 static int rtw_antdiv_cfg = 1; /*  0:OFF , 1:ON, 2:decide by Efuse config */
 static int rtw_antdiv_type; /* 0:decide by efuse  1: for 88EE, 1Tx and 1RxCG are diversity.(2 Ant with SPDT), 2:  for 88EE, 1Tx and 2Rx are diversity.(2 Ant, Tx and RxCG are both on aux port, RxCS is on main port), 3: for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port) */
 
@@ -311,7 +309,7 @@ static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev)
        registry_par->bt_ampdu = (u8)rtw_bt_ampdu;
        registry_par->ant_num = (s8)rtw_ant_num;
 
-       registry_par->accept_addba_req = (u8)rtw_AcceptAddbaReq;
+       registry_par->accept_addba_req = true;
 
        registry_par->antdiv_cfg = (u8)rtw_antdiv_cfg;
        registry_par->antdiv_type = (u8)rtw_antdiv_type;