From 110cb88568f0843f43d3bfea8ad9be85483e120e Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Mon, 6 Apr 2020 00:17:04 +0530 Subject: [PATCH] qcacld-3.0: Register NDI sta to send MC/BC frames Bring back the changes removed as part of the commit 48d77649cd7a ("qcacld-3.0: Don't add/remove peer for NDIs") to register NDI as sta to send MC/BC traffic when an NDP is latched on to this. Change-Id: I7215f07978323535ac6c1078aec8634ff4950a66 CRs-Fixed: 2656936 --- core/hdd/src/wlan_hdd_nan_datapath.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/hdd/src/wlan_hdd_nan_datapath.c b/core/hdd/src/wlan_hdd_nan_datapath.c index 7946b5865fca..9d5d0cd4d495 100644 --- a/core/hdd/src/wlan_hdd_nan_datapath.c +++ b/core/hdd/src/wlan_hdd_nan_datapath.c @@ -706,8 +706,10 @@ void hdd_ndi_drv_ndi_create_rsp_handler(uint8_t vdev_id, struct hdd_adapter *adapter; struct hdd_station_ctx *sta_ctx; struct csr_roam_info *roam_info; + struct bss_description tmp_bss_descp = {0}; uint16_t ndp_inactivity_timeout = 0; uint16_t ndp_keep_alive_period; + struct qdf_mac_addr bc_mac_addr = QDF_MAC_ADDR_BCAST_INIT; hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); if (!hdd_ctx) { @@ -760,6 +762,10 @@ void hdd_ndi_drv_ndi_create_rsp_handler(uint8_t vdev_id, ndi_rsp->reason /* create_reason */); } + hdd_save_peer(sta_ctx, &bc_mac_addr); + qdf_copy_macaddr(&roam_info->bssid, &bc_mac_addr); + hdd_roam_register_sta(adapter, roam_info, &tmp_bss_descp); + qdf_mem_free(roam_info); } @@ -788,6 +794,7 @@ void hdd_ndi_drv_ndi_delete_rsp_handler(uint8_t vdev_id) struct hdd_context *hdd_ctx; struct hdd_adapter *adapter; struct hdd_station_ctx *sta_ctx; + struct qdf_mac_addr bc_mac_addr = QDF_MAC_ADDR_BCAST_INIT; hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); if (!hdd_ctx) { @@ -807,6 +814,9 @@ void hdd_ndi_drv_ndi_delete_rsp_handler(uint8_t vdev_id) return; } + hdd_roam_deregister_sta(adapter, adapter->mac_addr); + hdd_delete_peer(sta_ctx, &bc_mac_addr); + wlan_hdd_netif_queue_control(adapter, WLAN_STOP_ALL_NETIF_QUEUE_N_CARRIER, WLAN_CONTROL_PATH);