qcacld-3.0: update the link addr for sae frame

Update the link address on which association has
happened for SAE authentication.

Change-Id: I0e3e386a8ec028ace04f0f81bc48a65be52ba1a2
CRs-Fixed: 3225835
This commit is contained in:
Arun Kumar Khandavalli
2022-06-20 18:11:32 +05:30
committed by Madan Koyyalamudi
parent bcf0e588e7
commit e4e44c1200
3 changed files with 41 additions and 5 deletions

View File

@@ -47,10 +47,13 @@ struct hdd_adapter_create_param {
#define hdd_adapter_is_ml_adapter(x) ((x)->mlo_adapter_info.is_ml_adapter)
#define hdd_adapter_is_associated_with_ml_adapter(x) \
((x)->mlo_adapter_info.associate_with_ml_adapter)
#define hdd_adapter_get_mlo_adapter_from_link(x) \
((x)->mlo_adapter_info.ml_adapter)
#else
#define hdd_adapter_is_link_adapter(x) (0)
#define hdd_adapter_is_ml_adapter(x) (0)
#define hdd_adapter_is_associated_with_ml_adapter(x) (0)
#define hdd_adapter_get_mlo_adapter_from_link(x) (NULL)
#endif
#if defined(WLAN_FEATURE_11BE_MLO) && defined(CFG80211_11BE_BASIC)

View File

@@ -216,6 +216,24 @@ static const int beacon_filter_table[] = {
#if defined(WLAN_FEATURE_SAE) && \
(defined(CFG80211_EXTERNAL_AUTH_SUPPORT) || \
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0))
#if defined (CFG80211_SAE_AUTH_TA_ADDR_SUPPORT)
static inline
void wlan_hdd_sae_copy_ta_addr(struct cfg80211_external_auth_params *params,
struct hdd_adapter *adapter)
{
if (wlan_vdev_mlme_is_mlo_vdev(adapter->vdev)) {
qdf_mem_copy(params->tx_addr,
wlan_vdev_mlme_get_linkaddr(adapter->vdev),
QDF_MAC_ADDR_SIZE);
}
}
#else
static inline
void wlan_hdd_sae_copy_ta_addr(struct cfg80211_external_auth_params *params,
struct hdd_adapter *adapter)
{
}
#endif
/**
* wlan_hdd_sae_callback() - Sends SAE info to supplicant
* @adapter: pointer adapter context
@@ -251,10 +269,12 @@ static void wlan_hdd_sae_callback(struct hdd_adapter *adapter,
params.action = NL80211_EXTERNAL_AUTH_START;
qdf_mem_copy(params.bssid, sae_info->peer_mac_addr.bytes,
QDF_MAC_ADDR_SIZE);
wlan_hdd_sae_copy_ta_addr(&params, adapter);
qdf_mem_copy(params.ssid.ssid, sae_info->ssid.ssId,
sae_info->ssid.length);
params.ssid.ssid_len = sae_info->ssid.length;
cfg80211_external_auth_request(adapter->dev, &params, flags);
hdd_debug("SAE: sent cmd");
}

View File

@@ -1060,6 +1060,7 @@ __hdd_indicate_mgmt_frame_to_user(struct hdd_adapter *adapter,
uint16_t auth_algo;
enum nl80211_rxmgmt_flags nl80211_flag = 0;
bool is_pasn_auth_frame = false;
struct hdd_adapter *assoc_adapter;
hdd_debug("Frame Type = %d Frame Length = %d freq = %d",
frame_type, frm_len, rx_freq);
@@ -1148,23 +1149,35 @@ __hdd_indicate_mgmt_frame_to_user(struct hdd_adapter *adapter,
adapter->dscp_to_up_map,
adapter->vdev_id);
assoc_adapter = adapter;
if (wlan_vdev_mlme_is_mlo_vdev(adapter->vdev) &&
!hdd_adapter_is_ml_adapter(adapter)) {
hdd_debug("adapter is not ml adapter move to ml adapter");
assoc_adapter = hdd_adapter_get_mlo_adapter_from_link(adapter);
if (!assoc_adapter) {
hdd_err("Assoc adapter is NULL");
return;
}
}
/* Indicate Frame Over Normal Interface */
hdd_debug("Indicate Frame over NL80211 sessionid : %d, idx :%d",
adapter->vdev_id, adapter->dev->ifindex);
assoc_adapter->vdev_id, assoc_adapter->dev->ifindex);
wlan_hdd_cfg80211_convert_rxmgmt_flags(rx_flags, &nl80211_flag);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))
cfg80211_rx_mgmt(adapter->dev->ieee80211_ptr,
cfg80211_rx_mgmt(assoc_adapter->dev->ieee80211_ptr,
rx_freq, rx_rssi * 100, pb_frames,
frm_len, NL80211_RXMGMT_FLAG_ANSWERED | nl80211_flag);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0))
cfg80211_rx_mgmt(adapter->dev->ieee80211_ptr,
cfg80211_rx_mgmt(assoc_adapter->dev->ieee80211_ptr,
rx_freq, rx_rssi * 100, pb_frames,
frm_len, NL80211_RXMGMT_FLAG_ANSWERED,
GFP_ATOMIC);
#else
cfg80211_rx_mgmt(adapter->dev->ieee80211_ptr, rx_freq,
cfg80211_rx_mgmt(assoc_adapter->dev->ieee80211_ptr, rx_freq,
rx_rssi * 100,
pb_frames, frm_len, GFP_ATOMIC);
#endif /* LINUX_VERSION_CODE */