Procházet zdrojové kódy

qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sir_ocb_config_channel

Replace tSirMacAddr with cdf_mac_addr in struct sir_ocb_config_channel.

Change-Id: I0f22ba3b3b63f8d56d3285522c0d8d1303e2f89c
CRs-Fixed: 898864
Srinivas Girigowda před 9 roky
rodič
revize
117e7fbb09

+ 1 - 1
core/hdd/inc/wlan_hdd_main.h

@@ -1002,7 +1002,7 @@ struct hdd_adapter_s {
 	struct sir_dcc_update_ndl_response dcc_update_ndl_resp;
 
 	/* MAC addresses used for OCB interfaces */
-	tSirMacAddr ocb_mac_address[CDF_MAX_CONCURRENCY_PERSONA];
+	struct cdf_mac_addr ocb_mac_address[CDF_MAX_CONCURRENCY_PERSONA];
 	int ocb_mac_addr_count;
 
 	/* BITMAP indicating pause reason */

+ 13 - 19
core/hdd/src/wlan_hdd_ocb.c

@@ -611,7 +611,7 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev,
 	/* Release all the mac addresses used for OCB */
 	for (i = 0; i < adapter->ocb_mac_addr_count; i++) {
 		wlan_hdd_release_intf_addr(adapter->pHddCtx,
-					   adapter->ocb_mac_address[i]);
+					   adapter->ocb_mac_address[i].bytes);
 	}
 	adapter->ocb_mac_addr_count = 0;
 
@@ -639,9 +639,8 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev,
 		 * First channel uses the adapter's address.
 		 */
 		if (i == 0) {
-			cdf_mem_copy(curr_chan->mac_address,
-				     adapter->macAddressCurrent.bytes,
-				     sizeof(tSirMacAddr));
+			cdf_copy_macaddr(&curr_chan->mac_address,
+				     &adapter->macAddressCurrent);
 		} else {
 			mac_addr = wlan_hdd_get_intf_addr(adapter->pHddCtx);
 			if (mac_addr == NULL) {
@@ -650,14 +649,12 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev,
 				goto fail;
 			}
 			cdf_mem_copy(config->channels[
-				     config->channel_count].mac_address,
+				     config->channel_count].mac_address.bytes,
 				     mac_addr, sizeof(tSirMacAddr));
 			/* Save the mac address to release later */
 			cdf_mem_copy(adapter->ocb_mac_address[
-				     adapter->ocb_mac_addr_count],
-				     mac_addr,
-				     sizeof(adapter->ocb_mac_address[
-				     adapter->ocb_mac_addr_count]));
+				     adapter->ocb_mac_addr_count].bytes,
+				     mac_addr, CDF_MAC_ADDR_SIZE);
 			adapter->ocb_mac_addr_count++;
 		}
 
@@ -978,7 +975,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
 	/* Release all the mac addresses used for OCB */
 	for (i = 0; i < adapter->ocb_mac_addr_count; i++) {
 		wlan_hdd_release_intf_addr(adapter->pHddCtx,
-					   adapter->ocb_mac_address[i]);
+					   adapter->ocb_mac_address[i].bytes);
 	}
 	adapter->ocb_mac_addr_count = 0;
 
@@ -988,23 +985,20 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
 	 */
 	for (i = 0; i < config->channel_count; i++) {
 		if (i == 0) {
-			cdf_mem_copy(config->channels[i].mac_address,
-				adapter->macAddressCurrent.bytes,
-				sizeof(tSirMacAddr));
+			cdf_copy_macaddr(&config->channels[i].mac_address,
+				&adapter->macAddressCurrent);
 		} else {
 			mac_addr = wlan_hdd_get_intf_addr(adapter->pHddCtx);
 			if (mac_addr == NULL) {
 				hddLog(LOGE, FL("Cannot obtain mac address"));
 				goto fail;
 			}
-			cdf_mem_copy(config->channels[i].mac_address,
-				mac_addr, sizeof(tSirMacAddr));
+			cdf_mem_copy(config->channels[i].mac_address.bytes,
+				mac_addr, CDF_MAC_ADDR_SIZE);
 			/* Save the mac address to release later */
-			cdf_mem_copy(adapter->ocb_mac_address[
+			cdf_copy_macaddr(&adapter->ocb_mac_address[
 				     adapter->ocb_mac_addr_count],
-				     config->channels[i].mac_address,
-				     sizeof(adapter->ocb_mac_address[
-				     adapter->ocb_mac_addr_count]));
+				     &config->channels[i].mac_address);
 			adapter->ocb_mac_addr_count++;
 		}
 	}

+ 1 - 1
core/mac/inc/sir_api.h

@@ -5197,7 +5197,7 @@ typedef void (*dcc_stats_event_callback_t)(void *hdd_ctx, uint32_t vdev_id,
 struct sir_ocb_config_channel {
 	uint32_t chan_freq;
 	uint32_t bandwidth;
-	tSirMacAddr mac_address;
+	struct cdf_mac_addr mac_address;
 	struct sir_qos_params qos_params[MAX_NUM_AC];
 	uint32_t max_pwr;
 	uint32_t min_pwr;

+ 3 - 2
core/wma/src/wma_ocb.c

@@ -343,8 +343,9 @@ int wma_ocb_set_config(tp_wma_handle wma_handle, struct sir_ocb_config *config)
 			       WMITLV_TAG_STRUC_wmi_ocb_channel,
 			       WMITLV_GET_STRUCT_TLVLEN(wmi_ocb_channel));
 		ocb_chan->bandwidth = config->channels[i].bandwidth;
-		WMI_CHAR_ARRAY_TO_MAC_ADDR(config->channels[i].mac_address,
-					   &ocb_chan->mac_address);
+		WMI_CHAR_ARRAY_TO_MAC_ADDR(
+					config->channels[i].mac_address.bytes,
+					&ocb_chan->mac_address);
 		buf_ptr += sizeof(*ocb_chan);
 	}