qcacld-3.0: Add MLD addr check for SAP Deauth/Disassoc
Currently, driver check peer mac address to filter out duplicate command in serialization queue. This peer mac address will be peer MLD address from North bound and link address from the south bound. For multi-link SAP, if disassociation or deauthentication request received for two links of same STA (MLD address is same but link address is different), then driver queue disassociation or deauthentication command in the serialization for both links. This will lead to duplicate disassociation or DE authentication commands in the serialization for same STA. So, to fix this, add check for MLD address and link address in the serialization filter. Change-Id: I2619e3009b28ceba6af4383e36ae40af82020b5f CRs-Fixed: 3790148
This commit is contained in:
@@ -100,6 +100,18 @@ enum wmm_user_mode {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* struct peer_mac_addresses -Peer MAC address info
|
||||
* @mac: Provided peer MAC address
|
||||
* @peer_mac: Peer MAC address
|
||||
* @peer_mld: Peer MLD address
|
||||
*/
|
||||
struct peer_mac_addresses {
|
||||
struct qdf_mac_addr mac;
|
||||
struct qdf_mac_addr peer_mac;
|
||||
struct qdf_mac_addr peer_mld;
|
||||
};
|
||||
|
||||
struct pwr_channel_info {
|
||||
uint32_t first_freq;
|
||||
uint8_t num_chan;
|
||||
@@ -2007,4 +2019,18 @@ uint8_t wlan_mlme_get_sap_psd_for_20mhz(struct wlan_objmgr_vdev *vdev);
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_set_sap_psd_for_20mhz(struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t psd_power);
|
||||
|
||||
/**
|
||||
* wlan_find_peer_and_get_mac_and_mld_addr() - This API find peer from the peer
|
||||
* list and cache peer MAC and MLD address in the peer_mac_info.
|
||||
* @psoc: PSOC object
|
||||
* @peer_mac_info: Peer MAC address info
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_find_peer_and_get_mac_and_mld_addr(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct peer_mac_addresses *peer_mac_info);
|
||||
|
||||
#endif
|
||||
|
@@ -5755,3 +5755,68 @@ wlan_mlme_set_sap_psd_for_20mhz(struct wlan_objmgr_vdev *vdev,
|
||||
mlme_priv->mlme_ap.psd_20mhz = psd_power;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_peer_find_mld_peer_n_get_mac_info() - This API will find MLD peer from
|
||||
* peer list.
|
||||
* @psoc: Pointer to psoc object
|
||||
* @obj: Pointer to peer object
|
||||
* @args: Pointer to void * argument
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void
|
||||
wlan_peer_find_mld_peer_n_get_mac_info(struct wlan_objmgr_psoc *psoc,
|
||||
void *obj, void *args)
|
||||
{
|
||||
struct wlan_objmgr_peer *peer = (struct wlan_objmgr_peer *)obj;
|
||||
struct peer_mac_addresses *peer_mac_info =
|
||||
(struct peer_mac_addresses *)args;
|
||||
uint8_t *mld_mac, *peer_mac, *given_mac;
|
||||
|
||||
mld_mac = wlan_peer_mlme_get_mldaddr(peer);
|
||||
peer_mac = wlan_peer_get_macaddr(peer);
|
||||
given_mac = peer_mac_info->mac.bytes;
|
||||
|
||||
if (!mld_mac || WLAN_ADDR_EQ(mld_mac, given_mac) != QDF_STATUS_SUCCESS)
|
||||
return;
|
||||
qdf_copy_macaddr(&peer_mac_info->peer_mac,
|
||||
(struct qdf_mac_addr *)peer_mac);
|
||||
qdf_copy_macaddr(&peer_mac_info->peer_mld,
|
||||
(struct qdf_mac_addr *)mld_mac);
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_find_peer_and_get_mac_and_mld_addr(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct peer_mac_addresses *peer_mac_info)
|
||||
{
|
||||
struct wlan_objmgr_peer *peer;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
peer = wlan_objmgr_get_peer_by_mac(psoc, peer_mac_info->mac.bytes,
|
||||
WLAN_LEGACY_MAC_ID);
|
||||
if (peer) {
|
||||
qdf_copy_macaddr(
|
||||
&peer_mac_info->peer_mac,
|
||||
(struct qdf_mac_addr *)wlan_peer_get_macaddr(peer));
|
||||
if (wlan_peer_mlme_get_mldaddr(peer))
|
||||
qdf_copy_macaddr(
|
||||
&peer_mac_info->peer_mld,
|
||||
(struct qdf_mac_addr *)
|
||||
wlan_peer_mlme_get_mldaddr(peer));
|
||||
wlan_objmgr_peer_release_ref(peer, WLAN_LEGACY_MAC_ID);
|
||||
return status;
|
||||
}
|
||||
|
||||
/* if not found with mac address try finding using MLD address */
|
||||
wlan_objmgr_iterate_obj_list(psoc, WLAN_PEER_OP,
|
||||
wlan_peer_find_mld_peer_n_get_mac_info,
|
||||
peer_mac_info, 0, WLAN_LEGACY_MAC_ID);
|
||||
if (qdf_is_macaddr_zero(&peer_mac_info->peer_mac)) {
|
||||
mlme_err("peer is null for mac:" QDF_MAC_ADDR_FMT,
|
||||
QDF_MAC_ADDR_REF(peer_mac_info->mac.bytes));
|
||||
return QDF_STATUS_E_EXISTS;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user