MLD STA: Use MLD addresses for sending non-Public Action frames
The Linux kernel expects to use the AP MLD address as destination and BSSID addresses for non-Public Action frames when the current association is MLO capable. Use the MLD addresses to support this. Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
This commit is contained in:
parent
17ae988736
commit
496a1ced16
2 changed files with 44 additions and 14 deletions
|
@ -406,20 +406,10 @@ static inline int wpa_drv_set_supp_port(struct wpa_supplicant *wpa_s,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int wpa_drv_send_action(struct wpa_supplicant *wpa_s,
|
||||
unsigned int freq,
|
||||
unsigned int wait,
|
||||
const u8 *dst, const u8 *src,
|
||||
const u8 *bssid,
|
||||
const u8 *data, size_t data_len,
|
||||
int no_cck)
|
||||
{
|
||||
if (wpa_s->driver->send_action)
|
||||
return wpa_s->driver->send_action(wpa_s->drv_priv, freq,
|
||||
wait, dst, src, bssid,
|
||||
data, data_len, no_cck);
|
||||
return -1;
|
||||
}
|
||||
int wpa_drv_send_action(struct wpa_supplicant *wpa_s, unsigned int freq,
|
||||
unsigned int wait, const u8 *dst, const u8 *src,
|
||||
const u8 *bssid, const u8 *data, size_t data_len,
|
||||
int no_cck);
|
||||
|
||||
static inline void wpa_drv_send_action_cancel_wait(struct wpa_supplicant *wpa_s)
|
||||
{
|
||||
|
|
|
@ -8869,3 +8869,43 @@ wpa_drv_get_scan_results2(struct wpa_supplicant *wpa_s)
|
|||
|
||||
return scan_res;
|
||||
}
|
||||
|
||||
|
||||
static bool wpas_ap_link_address(struct wpa_supplicant *wpa_s, const u8 *addr)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!wpa_s->valid_links)
|
||||
return false;
|
||||
|
||||
for (i = 0; i < MAX_NUM_MLD_LINKS; i++) {
|
||||
if (!(wpa_s->valid_links & BIT(i)))
|
||||
continue;
|
||||
|
||||
if (os_memcmp(wpa_s->links[i].bssid, addr, ETH_ALEN) == 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
int wpa_drv_send_action(struct wpa_supplicant *wpa_s, unsigned int freq,
|
||||
unsigned int wait, const u8 *dst, const u8 *src,
|
||||
const u8 *bssid, const u8 *data, size_t data_len,
|
||||
int no_cck)
|
||||
{
|
||||
if (!wpa_s->driver->send_action)
|
||||
return -1;
|
||||
|
||||
if (data_len > 0 && data[0] != WLAN_ACTION_PUBLIC) {
|
||||
if (wpas_ap_link_address(wpa_s, dst))
|
||||
dst = wpa_s->ap_mld_addr;
|
||||
|
||||
if (wpas_ap_link_address(wpa_s, bssid))
|
||||
bssid = wpa_s->ap_mld_addr;
|
||||
}
|
||||
|
||||
return wpa_s->driver->send_action(wpa_s->drv_priv, freq, wait, dst, src,
|
||||
bssid, data, data_len, no_cck);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue