[PATCH 3/3] Rename sta to sta_params

Eugene Krasnikov k.eugene.e at gmail.com
Thu Jul 11 14:04:49 EDT 2013


Rename local variable sta to sta_params because
in future ieee80211_sta will be passed and called sta.

Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
 smd.c | 149 ++++++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 77 insertions(+), 72 deletions(-)

diff --git a/smd.c b/smd.c
index a87b372..027d132 100644
--- a/smd.c
+++ b/smd.c
@@ -493,60 +493,61 @@ int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif,
 			   const u8 *bssid, const u8 *sta_mac)
 {
 	struct wcn36xx_hal_config_sta_req_msg msg;
-	struct wcn36xx_hal_config_sta_params *sta;
+	struct wcn36xx_hal_config_sta_params *sta_params;
 
 	INIT_HAL_MSG(msg, WCN36XX_HAL_CONFIG_STA_REQ);
 
-	sta = &msg.sta_params;
+	sta_params = &msg.sta_params;
 
-	memcpy(&sta->bssid, bssid, ETH_ALEN);
+	memcpy(&sta_params->bssid, bssid, ETH_ALEN);
 
-	sta->aid = wcn->aid;
+	sta_params->aid = wcn->aid;
 
 	if (vif->type == NL80211_IFTYPE_ADHOC ||
 	    vif->type == NL80211_IFTYPE_AP ||
 	    vif->type == NL80211_IFTYPE_MESH_POINT)
-		sta->type = 1;
+		sta_params->type = 1;
 	else
-		sta->type = 0;
+		sta_params->type = 0;
 
-	sta->short_preamble_supported = 0;
+	sta_params->short_preamble_supported = 0;
 
-	memcpy(&sta->mac, sta_mac, ETH_ALEN);
+	memcpy(&sta_params->mac, sta_mac, ETH_ALEN);
 
-	sta->listen_interval = 0x8;
-	sta->wmm_enabled = 0;
-	sta->ht_capable = wcn->supported_rates.supported_mcs_set[0] ? 1 : 0;
-	sta->tx_channel_width_set = 0;
-	sta->rifs_mode = 0;
-	sta->lsig_txop_protection = 0;
-	sta->max_ampdu_size = 0;
-	sta->max_ampdu_density = 0;
-	sta->sgi_40mhz = 0;
-	sta->sgi_20Mhz = 0;
+	sta_params->listen_interval = 0x8;
+	sta_params->wmm_enabled = 0;
+	sta_params->ht_capable =
+		wcn->supported_rates.supported_mcs_set[0] ? 1 : 0;
+	sta_params->tx_channel_width_set = 0;
+	sta_params->rifs_mode = 0;
+	sta_params->lsig_txop_protection = 0;
+	sta_params->max_ampdu_size = 0;
+	sta_params->max_ampdu_density = 0;
+	sta_params->sgi_40mhz = 0;
+	sta_params->sgi_20Mhz = 0;
 
-	memcpy(&sta->supported_rates, &wcn->supported_rates,
+	memcpy(&sta_params->supported_rates, &wcn->supported_rates,
 		sizeof(wcn->supported_rates));
 
-	sta->rmf = 0;
-	sta->encrypt_type = 0;
-	sta->action = 0;
-	sta->uapsd = 0;
-	sta->max_sp_len = 0;
-	sta->green_field_capable = 0;
-	sta->mimo_ps = WCN36XX_HAL_HT_MIMO_PS_STATIC;
-	sta->delayed_ba_support = 0;
-	sta->max_ampdu_duration = 0;
-	sta->dsss_cck_mode_40mhz = 0;
+	sta_params->rmf = 0;
+	sta_params->encrypt_type = 0;
+	sta_params->action = 0;
+	sta_params->uapsd = 0;
+	sta_params->max_sp_len = 0;
+	sta_params->green_field_capable = 0;
+	sta_params->mimo_ps = WCN36XX_HAL_HT_MIMO_PS_STATIC;
+	sta_params->delayed_ba_support = 0;
+	sta_params->max_ampdu_duration = 0;
+	sta_params->dsss_cck_mode_40mhz = 0;
 	if (vif->type == NL80211_IFTYPE_ADHOC ||
 	    vif->type == NL80211_IFTYPE_AP ||
 	    vif->type == NL80211_IFTYPE_MESH_POINT)
-		sta->sta_index = 0xFF;
+		sta_params->sta_index = 0xFF;
 	else
-		sta->sta_index = 1;
+		sta_params->sta_index = 1;
 
-	sta->bssid_index = 0;
-	sta->p2p = 0;
+	sta_params->bssid_index = 0;
+	sta_params->p2p = 0;
 
 	if (!(wcn->fw_major == 1 &&
 	      wcn->fw_minor == 2 &&
@@ -558,8 +559,9 @@ int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif,
 
 	wcn36xx_dbg(WCN36XX_DBG_HAL,
 		    "hal config sta action %d sta_index %d bssid_index %d bssid %pM type %d mac %pM aid %d",
-		    sta->action, sta->sta_index, sta->bssid_index,
-		    sta->bssid, sta->type, sta->mac, sta->aid);
+		    sta_params->action, sta_params->sta_index,
+		    sta_params->bssid_index, sta_params->bssid,
+		    sta_params->type, sta_params->mac, sta_params->aid);
 
 	return wcn36xx_smd_send_and_wait(wcn, msg.header.len);
 }
@@ -708,12 +710,12 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
 {
 	struct wcn36xx_hal_config_bss_req_msg msg;
 	struct wcn36xx_hal_config_bss_params *bss;
-	struct wcn36xx_hal_config_sta_params *sta;
+	struct wcn36xx_hal_config_sta_params *sta_params;
 
 	INIT_HAL_MSG(msg, WCN36XX_HAL_CONFIG_BSS_REQ);
 
 	bss = &msg.bss_params;
-	sta = &bss->sta;
+	sta_params = &bss->sta;
 
 	WARN_ON(is_zero_ether_addr(bssid));
 
@@ -758,39 +760,40 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
 	bss->ext_channel = 0;
 	bss->reserved = 0;
 
-	memcpy(&sta->bssid, bssid, ETH_ALEN);
-
-	sta->aid = wcn->aid;
-	sta->type = 0;
-	sta->short_preamble_supported = 0;
-	memcpy(&sta->mac, &wcn->addresses[0], ETH_ALEN);
-	sta->listen_interval = 8;
-	sta->wmm_enabled = 0;
-	sta->ht_capable = wcn->supported_rates.supported_mcs_set[0] ? 1 : 0;
-	sta->tx_channel_width_set = 0;
-	sta->rifs_mode = 0;
-	sta->lsig_txop_protection = 0;
-	sta->max_ampdu_size = 0;
-	sta->max_ampdu_density = 0;
-	sta->sgi_40mhz = 0;
-	sta->sgi_20Mhz = 0;
-
-	memcpy(&sta->supported_rates, &wcn->supported_rates,
+	memcpy(&sta_params->bssid, bssid, ETH_ALEN);
+
+	sta_params->aid = wcn->aid;
+	sta_params->type = 0;
+	sta_params->short_preamble_supported = 0;
+	memcpy(&sta_params->mac, &wcn->addresses[0], ETH_ALEN);
+	sta_params->listen_interval = 8;
+	sta_params->wmm_enabled = 0;
+	sta_params->ht_capable =
+		wcn->supported_rates.supported_mcs_set[0] ? 1 : 0;
+	sta_params->tx_channel_width_set = 0;
+	sta_params->rifs_mode = 0;
+	sta_params->lsig_txop_protection = 0;
+	sta_params->max_ampdu_size = 0;
+	sta_params->max_ampdu_density = 0;
+	sta_params->sgi_40mhz = 0;
+	sta_params->sgi_20Mhz = 0;
+
+	memcpy(&sta_params->supported_rates, &wcn->supported_rates,
 	       sizeof(wcn->supported_rates));
 
-	sta->rmf = 0;
-	sta->encrypt_type = wcn->encrypt_type;
-	sta->action = 0;
-	sta->uapsd = 0;
-	sta->max_sp_len = 0;
-	sta->green_field_capable = 0;
-	sta->mimo_ps = 0;
-	sta->delayed_ba_support = 0;
-	sta->max_ampdu_duration = 0;
-	sta->dsss_cck_mode_40mhz = 0;
-	sta->sta_index = 0xff;
-	sta->bssid_index = 0;
-	sta->p2p = 0;
+	sta_params->rmf = 0;
+	sta_params->encrypt_type = wcn->encrypt_type;
+	sta_params->action = 0;
+	sta_params->uapsd = 0;
+	sta_params->max_sp_len = 0;
+	sta_params->green_field_capable = 0;
+	sta_params->mimo_ps = 0;
+	sta_params->delayed_ba_support = 0;
+	sta_params->max_ampdu_duration = 0;
+	sta_params->dsss_cck_mode_40mhz = 0;
+	sta_params->sta_index = 0xff;
+	sta_params->bssid_index = 0;
+	sta_params->p2p = 0;
 
 	/* wcn->ssid is only valid in AP and IBSS mode */
 	bss->ssid.length = wcn->ssid.length;
@@ -822,10 +825,10 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
 	bss->max_tx_power = 0x10;
 
 	if (update) {
-		sta->bssid_index = 0;
+		sta_params->bssid_index = 0;
 		bss->action = 1;
 	} else {
-		sta->bssid_index = 0xff;
+		sta_params->bssid_index = 0xff;
 		bss->action = 0;
 	}
 	if (!(wcn->fw_major == 1 &&
@@ -843,8 +846,10 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
 
 	wcn36xx_dbg(WCN36XX_DBG_HAL,
 		    "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM",
-		    sta->bssid, sta->action, sta->sta_index,
-		    sta->bssid_index, sta->aid, sta->type, sta->mac);
+		    sta_params->bssid, sta_params->action,
+		    sta_params->sta_index, sta_params->bssid_index,
+		    sta_params->aid, sta_params->type,
+		    sta_params->mac);
 
 	return wcn36xx_smd_send_and_wait(wcn, msg.header.len);
 }
-- 
1.7.11.3




More information about the wcn36xx mailing list