浏览代码

qcacld-3.0: Rename hdd_ap_ctx uBCStaId field

Per the Linux coding style "mixed-case names are frowned upon" so
rename field uBCStaId in struct hdd_ap_ctx.

Change-Id: Id23184e2daa074016672ec69cf46261ae604f0c5
CRs-Fixed: 2134917
Jeff Johnson 7 年之前
父节点
当前提交
42518cf9ce
共有 3 个文件被更改,包括 22 次插入18 次删除
  1. 2 3
      core/hdd/inc/wlan_hdd_main.h
  2. 8 7
      core/hdd/src/wlan_hdd_hostapd.c
  3. 12 8
      core/hdd/src/wlan_hdd_softap_tx_rx.c

+ 2 - 3
core/hdd/inc/wlan_hdd_main.h

@@ -809,12 +809,11 @@ struct hdd_station_info {
 /**
  * struct hdd_ap_ctx - SAP/P2PGO specific information
  * @hostapd_state: state control information
+ * @broadcast_sta_id: Station ID assigned after BSS starts
  */
 struct hdd_ap_ctx {
 	struct hdd_hostapd_state hostapd_state;
-
-	/** Station ID assigned after BSS starts */
-	uint8_t uBCStaId;
+	uint8_t broadcast_sta_id;
 
 	uint8_t uPrivacy;       /* The privacy bits of configuration */
 

+ 8 - 7
core/hdd/src/wlan_hdd_hostapd.c

@@ -666,14 +666,15 @@ static void hdd_clear_all_sta(struct hdd_adapter *adapter,
 	uint8_t staId = 0;
 	struct net_device *dev;
 	struct tagCsrDelStaParams del_sta_params;
+	struct hdd_ap_ctx *ap_ctx;
 
 	dev = (struct net_device *)usrDataForCallback;
 
 	hdd_debug("Clearing all the STA entry....");
+	ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
 	for (staId = 0; staId < WLAN_MAX_STA_COUNT; staId++) {
 		if (adapter->sta_info[staId].in_use &&
-		    (staId !=
-		     (WLAN_HDD_GET_AP_CTX_PTR(adapter))->uBCStaId)) {
+		    (staId != ap_ctx->broadcast_sta_id)) {
 			wlansap_populate_del_sta_params(
 				&adapter->sta_info[staId].sta_mac.
 				bytes[0], eSIR_MAC_DEAUTH_LEAVING_BSS_REASON,
@@ -1496,7 +1497,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		} else {
 			sme_ch_avoid_update_req(hdd_ctx->hHal);
 
-			ap_ctx->uBCStaId =
+			ap_ctx->broadcast_sta_id =
 				pSapEvent->sapevt.sapStartBssCompleteEvent.staId;
 
 			hdd_register_tx_flow_control(adapter,
@@ -1521,7 +1522,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 
 		if (hdd_ipa_is_enabled(hdd_ctx)) {
 			status = hdd_ipa_wlan_evt(adapter,
-					ap_ctx->uBCStaId,
+					ap_ctx->broadcast_sta_id,
 					HDD_IPA_AP_CONNECT,
 					adapter->dev->dev_addr);
 			if (status) {
@@ -1673,7 +1674,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		ap_ctx->operatingChannel = 0;
 		if (hdd_ipa_is_enabled(hdd_ctx)) {
 			status = hdd_ipa_wlan_evt(adapter,
-					ap_ctx->uBCStaId,
+					ap_ctx->broadcast_sta_id,
 					HDD_IPA_AP_DISCONNECT,
 					adapter->dev->dev_addr);
 			if (status) {
@@ -2080,7 +2081,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 			if (adapter->sta_info[i].in_use
 			    && i !=
 			    (WLAN_HDD_GET_AP_CTX_PTR(adapter))->
-			    uBCStaId) {
+			    broadcast_sta_id) {
 				ap_ctx->bApActive = true;
 				break;
 			}
@@ -5134,7 +5135,7 @@ static int hdd_softap_get_sta_info(struct hdd_adapter *adapter,
 
 	ENTER();
 
-	bc_sta_id = WLAN_HDD_GET_AP_CTX_PTR(adapter)->uBCStaId;
+	bc_sta_id = WLAN_HDD_GET_AP_CTX_PTR(adapter)->broadcast_sta_id;
 
 	written = scnprintf(buf, size, "\nstaId staAddress\n");
 	for (i = 0; i < WLAN_MAX_STA_COUNT; i++) {

+ 12 - 8
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -338,7 +338,7 @@ static int __hdd_softap_hard_start_xmit(struct sk_buff *skb,
 		 * starting phase.  SAP will return the station ID
 		 * used for BC/MC traffic.
 		 */
-		STAId = ap_ctx->uBCStaId;
+		STAId = ap_ctx->broadcast_sta_id;
 	} else {
 		if (QDF_STATUS_SUCCESS !=
 			 hdd_softap_get_sta_id(adapter,
@@ -1005,11 +1005,11 @@ QDF_STATUS hdd_softap_register_bc_sta(struct hdd_adapter *adapter,
 	ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
 
 	hdd_ctx->sta_to_adapter[WLAN_RX_BCMC_STA_ID] = adapter;
-	hdd_ctx->sta_to_adapter[ap_ctx->uBCStaId] = adapter;
+	hdd_ctx->sta_to_adapter[ap_ctx->broadcast_sta_id] = adapter;
 	qdf_status =
 		hdd_softap_register_sta(adapter, false, fPrivacyBit,
-					(WLAN_HDD_GET_AP_CTX_PTR(adapter))->
-					uBCStaId, 0, 1, &broadcastMacAddr, 0);
+					ap_ctx->broadcast_sta_id,
+					0, 1, &broadcastMacAddr, 0);
 
 	return qdf_status;
 }
@@ -1022,9 +1022,10 @@ QDF_STATUS hdd_softap_register_bc_sta(struct hdd_adapter *adapter,
  */
 QDF_STATUS hdd_softap_deregister_bc_sta(struct hdd_adapter *adapter)
 {
-	return hdd_softap_deregister_sta(adapter,
-					 (WLAN_HDD_GET_AP_CTX_PTR(adapter))->
-					 uBCStaId);
+	struct hdd_ap_ctx *ap_ctx;
+
+	ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
+	return hdd_softap_deregister_sta(adapter, ap_ctx->broadcast_sta_id);
 }
 
 /**
@@ -1048,8 +1049,11 @@ QDF_STATUS hdd_softap_stop_bss(struct hdd_adapter *adapter)
 	qdf_status = hdd_softap_deregister_bc_sta(adapter);
 
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
+		struct hdd_ap_ctx *ap_ctx;
+
+		ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
 		hdd_err("Failed to deregister BC sta Id %d",
-			(WLAN_HDD_GET_AP_CTX_PTR(adapter))->uBCStaId);
+			ap_ctx->broadcast_sta_id);
 	}
 
 	for (staId = 0; staId < WLAN_MAX_STA_COUNT; staId++) {