diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index dbe70b7da274..f77605e9759c 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/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 */ diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c index 10674cbfcff0..881859a074b8 100644 --- a/core/hdd/src/wlan_hdd_ocb.c +++ b/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++; } } diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index de8250080530..a6b481ba3ada 100644 --- a/core/mac/inc/sir_api.h +++ b/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; diff --git a/core/wma/src/wma_ocb.c b/core/wma/src/wma_ocb.c index 1fde2f276829..260a8273b44c 100644 --- a/core/wma/src/wma_ocb.c +++ b/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); }