diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 6ff2107fa3..f90c6ffacc 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -2087,7 +2087,12 @@ QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter, /* Get the Station ID from the one saved during the association */ txrx_desc.sta_id = sta_id; - WLAN_ADDR_COPY(txrx_desc.peer_addr.bytes, roam_info->bssid.bytes); + if (!QDF_IS_ADDR_BROADCAST(roam_info->bssid.bytes)) + WLAN_ADDR_COPY(txrx_desc.peer_addr.bytes, + roam_info->bssid.bytes); + else + WLAN_ADDR_COPY(txrx_desc.peer_addr.bytes, + adapter->mac_addr.bytes); /* set the QoS field appropriately */ if (hdd_wmm_is_active(adapter)) diff --git a/core/hdd/src/wlan_hdd_nan_datapath.c b/core/hdd/src/wlan_hdd_nan_datapath.c index ff77f7a7a5..8472c4f3ff 100644 --- a/core/hdd/src/wlan_hdd_nan_datapath.c +++ b/core/hdd/src/wlan_hdd_nan_datapath.c @@ -653,9 +653,6 @@ int hdd_ndi_delete(uint8_t vdev_id, char *iface_name, uint16_t transaction_id) return -EINVAL; } - /* Since, the interface is being deleted, remove the broadcast id. */ - sta_ctx->broadcast_sta_id = HDD_WLAN_INVALID_STA_ID; - os_if_nan_set_ndp_delete_transaction_id(adapter->vdev, transaction_id); os_if_nan_set_ndi_state(adapter->vdev, NAN_DATA_NDI_DELETING_STATE); @@ -724,6 +721,7 @@ void hdd_ndi_drv_ndi_create_rsp_handler(uint8_t vdev_id, sta_ctx->broadcast_sta_id = sta_id; hdd_save_peer(sta_ctx, sta_id, &bc_mac_addr); + qdf_copy_macaddr(&roam_info->bssid, &bc_mac_addr); hdd_roam_register_sta(adapter, roam_info, sta_id, &tmp_bss_descp); qdf_mem_free(roam_info); @@ -776,7 +774,7 @@ void hdd_ndi_drv_ndi_delete_rsp_handler(uint8_t vdev_id) sta_id = sta_ctx->broadcast_sta_id; if (sta_id < HDD_MAX_ADAPTERS) { - hdd_roam_deregister_sta(adapter, sta_ctx->requested_bssid); + hdd_roam_deregister_sta(adapter, adapter->mac_addr); hdd_delete_peer(sta_ctx, sta_id); sta_ctx->broadcast_sta_id = HDD_WLAN_INVALID_STA_ID; }