Commit cab77590 authored by Saurav Girepunje's avatar Saurav Girepunje Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723bs: core: remove unneeded variable



Below are the changes:

Remove unneeded variable "u8 *pbuf" from function start_bss_network
argument as this can be get from first argument "padapter"

Remove the struct wlan_bssid_ex *network from createbss_hdl function
as this is only used to pass as second argument to start_bss_network()

Remove the struct mlme_priv *mlmepriv from rtw_ap_restore_network
function as this is only used to pass as second argument
to start_bss_network()

Signed-off-by: default avatarSaurav Girepunje <saurav.girepunje@google.com>
Link: https://lore.kernel.org/r/20210428154011.GA5571@user


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ac76b438
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -653,7 +653,7 @@ static void update_hw_ht_param(struct adapter *padapter)
	/* pmlmeinfo->HT_protection = pmlmeinfo->HT_info.infos[1] & 0x3; */
}

void start_bss_network(struct adapter *padapter, u8 *pbuf)
void start_bss_network(struct adapter *padapter)
{
	u8 *p;
	u8 val8, cur_channel, cur_bwmode, cur_ch_offset;
@@ -2039,7 +2039,6 @@ void ap_sta_info_defer_update(struct adapter *padapter, struct sta_info *psta)
/* restore hw setting from sw data structures */
void rtw_ap_restore_network(struct adapter *padapter)
{
	struct mlme_priv *mlmepriv = &padapter->mlmepriv;
	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
	struct sta_priv *pstapriv = &padapter->stapriv;
	struct sta_info *psta;
@@ -2058,7 +2057,7 @@ void rtw_ap_restore_network(struct adapter *padapter)
		pmlmeext->cur_bwmode
	);

	start_bss_network(padapter, (u8 *)&mlmepriv->cur_network.network);
	start_bss_network(padapter);

	if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) ||
		(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) {
+1 −1
Original line number Diff line number Diff line
@@ -669,7 +669,7 @@ int rtw_startbss_cmd(struct adapter *padapter, int flags)

	if (flags & RTW_CMDF_DIRECTLY) {
		/* no need to enqueue, do the cmd hdl directly and free cmd parameter */
		start_bss_network(padapter, (u8 *)&(padapter->mlmepriv.cur_network.network));
		start_bss_network(padapter);
	} else {
		/* need enqueue, prepare cmd_obj and enqueue */
		pcmd = rtw_zmalloc(sizeof(struct cmd_obj));
+1 −3
Original line number Diff line number Diff line
@@ -5455,9 +5455,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
	/* u32 initialgain; */

	if (pmlmeinfo->state == WIFI_FW_AP_STATE) {
		struct wlan_bssid_ex *network = &padapter->mlmepriv.cur_network.network;

		start_bss_network(padapter, (u8 *)network);
		start_bss_network(padapter);
		return H2C_SUCCESS;
	}

+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx);
void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level);
void expire_timeout_chk(struct adapter *padapter);
void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta);
void start_bss_network(struct adapter *padapter, u8 *pbuf);
void start_bss_network(struct adapter *padapter);
int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len);
void rtw_ap_restore_network(struct adapter *padapter);
void rtw_set_macaddr_acl(struct adapter *padapter, int mode);