qcacld-3.0: Update NDP peer MC list
Currently, driver gets peer multicast address list from kernel for all interfaces and it send this list to firmware. For NDI, on NDP confirmation indication, driver appends the multicast list with new NDP peer added and then send it to firmware. But this is done for first NDP peer only, kernel does not provide multicast list again as kernel already configures the multicast addresses, unless there is some reset happens in kernel. This can cause issue as firmware is expecting the updated multicast filter on each NDP confirmation (new peer is added) to enable the NS frame exchange. As new peer is not added in the filter, firmware will reject the NS frame. So, to fix this, update the multicast list on NDP peer addition and deletion. Change-Id: I6371199ae5c3a8f4088987f1e6f10c39cbed1685 CRs-Fixed: 3518887
This commit is contained in:

committed by
Rahul Choudhary

parent
4d27a6c841
commit
ea6a35e9f6
@@ -175,6 +175,37 @@ inline QDF_STATUS ucfg_nan_set_active_peers(struct wlan_objmgr_vdev *vdev,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_nan_update_mc_list() - update the multicast list
|
||||
* @vdev: Pointer to VDEV Object
|
||||
*
|
||||
* This function will update the multicast list for NDP peer
|
||||
*/
|
||||
static void ucfg_nan_update_mc_list(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct nan_callbacks cb_obj;
|
||||
QDF_STATUS status;
|
||||
struct wlan_objmgr_psoc *psoc = wlan_vdev_get_psoc(vdev);
|
||||
|
||||
if (!psoc) {
|
||||
nan_err("psoc is null");
|
||||
return;
|
||||
}
|
||||
|
||||
status = ucfg_nan_get_callbacks(psoc, &cb_obj);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
nan_err("Couldn't get callback object");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cb_obj.set_mc_list) {
|
||||
nan_err("set_mc_list callback not registered");
|
||||
return;
|
||||
}
|
||||
|
||||
cb_obj.set_mc_list(vdev);
|
||||
}
|
||||
|
||||
inline void ucfg_nan_set_peer_mc_list(struct wlan_objmgr_vdev *vdev,
|
||||
struct qdf_mac_addr peer_mac_addr)
|
||||
{
|
||||
@@ -204,7 +235,7 @@ inline void ucfg_nan_set_peer_mc_list(struct wlan_objmgr_vdev *vdev,
|
||||
}
|
||||
if (list_idx == max_ndp_sessions) {
|
||||
nan_err("Peer multicast address list is full");
|
||||
goto end;
|
||||
qdf_spin_unlock_bh(&priv_obj->lock);
|
||||
}
|
||||
/* Derive peer multicast addr */
|
||||
peer_mac_addr.bytes[0] = 0x33;
|
||||
@@ -212,8 +243,9 @@ inline void ucfg_nan_set_peer_mc_list(struct wlan_objmgr_vdev *vdev,
|
||||
peer_mac_addr.bytes[2] = 0xff;
|
||||
priv_obj->peer_mc_addr_list[list_idx] = peer_mac_addr;
|
||||
|
||||
end:
|
||||
qdf_spin_unlock_bh(&priv_obj->lock);
|
||||
|
||||
ucfg_nan_update_mc_list(vdev);
|
||||
}
|
||||
|
||||
inline void ucfg_nan_get_peer_mc_list(
|
||||
@@ -258,7 +290,10 @@ inline void ucfg_nan_clear_peer_mc_list(struct wlan_objmgr_psoc *psoc,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
qdf_spin_unlock_bh(&priv_obj->lock);
|
||||
|
||||
ucfg_nan_update_mc_list(vdev);
|
||||
}
|
||||
|
||||
inline uint32_t ucfg_nan_get_active_peers(struct wlan_objmgr_vdev *vdev)
|
||||
@@ -628,6 +663,8 @@ int ucfg_nan_register_hdd_callbacks(struct wlan_objmgr_psoc *psoc,
|
||||
ucfg_nan_request_process_cb;
|
||||
psoc_obj->cb_obj.nan_concurrency_update =
|
||||
cb_obj->nan_concurrency_update;
|
||||
psoc_obj->cb_obj.set_mc_list = cb_obj->set_mc_list;
|
||||
|
||||
nan_register_sr_concurrency_callback(psoc_obj, cb_obj);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user