TDLS: Set EHT/MLO information for TDLS STA into the driver
Add the copied EHT capabilities into the sta_add() call when adding a TDLS peer. The mld_link_id value was previously only for AP mode, but it can now be used for TDLS links as well to indicate the link on which a single-link-TDLS direct link is negotiated. Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
This commit is contained in:
parent
940ef9a05c
commit
f429064189
5 changed files with 24 additions and 9 deletions
|
@ -1918,7 +1918,10 @@ static int wpa_tdls_addset_peer(struct wpa_sm *sm, struct wpa_tdls_peer *peer,
|
|||
peer->supp_channels,
|
||||
peer->supp_channels_len,
|
||||
peer->supp_oper_classes,
|
||||
peer->supp_oper_classes_len);
|
||||
peer->supp_oper_classes_len,
|
||||
peer->eht_capabilities,
|
||||
peer->eht_capab_len,
|
||||
peer->mld_link_id);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2087,7 +2090,7 @@ static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr,
|
|||
peer->initiator = 1;
|
||||
wpa_sm_tdls_peer_addset(sm, peer->addr, 1, 0, 0, NULL, 0, NULL,
|
||||
NULL, NULL, 0, NULL, 0, 0, NULL, 0,
|
||||
NULL, 0, NULL, 0);
|
||||
NULL, 0, NULL, 0, NULL, 0, link_id);
|
||||
if (wpa_tdls_send_tpk_m1(sm, peer) == -2) {
|
||||
peer = NULL;
|
||||
goto error;
|
||||
|
@ -2870,7 +2873,7 @@ int wpa_tdls_start(struct wpa_sm *sm, const u8 *addr)
|
|||
/* add the peer to the driver as a "setup in progress" peer */
|
||||
if (wpa_sm_tdls_peer_addset(sm, peer->addr, 1, 0, 0, NULL, 0, NULL,
|
||||
NULL, NULL, 0, NULL, 0, 0, NULL, 0, NULL, 0,
|
||||
NULL, 0)) {
|
||||
NULL, 0, NULL, 0, peer->mld_link_id)) {
|
||||
wpa_tdls_disable_peer_link(sm, peer);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,9 @@ struct wpa_sm_ctx {
|
|||
size_t ext_capab_len, const u8 *supp_channels,
|
||||
size_t supp_channels_len,
|
||||
const u8 *supp_oper_classes,
|
||||
size_t supp_oper_classes_len);
|
||||
size_t supp_oper_classes_len,
|
||||
const struct ieee80211_eht_capabilities *eht_capab,
|
||||
size_t eht_capab_len, int mld_link_id);
|
||||
int (*tdls_enable_channel_switch)(
|
||||
void *ctx, const u8 *addr, u8 oper_class,
|
||||
const struct hostapd_freq_params *params);
|
||||
|
|
|
@ -410,7 +410,9 @@ wpa_sm_tdls_peer_addset(struct wpa_sm *sm, const u8 *addr, int add,
|
|||
u8 qosinfo, int wmm, const u8 *ext_capab,
|
||||
size_t ext_capab_len, const u8 *supp_channels,
|
||||
size_t supp_channels_len, const u8 *supp_oper_classes,
|
||||
size_t supp_oper_classes_len)
|
||||
size_t supp_oper_classes_len,
|
||||
const struct ieee80211_eht_capabilities *eht_capab,
|
||||
size_t eht_capab_len, int mld_link_id)
|
||||
{
|
||||
if (sm->ctx->tdls_peer_addset)
|
||||
return sm->ctx->tdls_peer_addset(sm->ctx->ctx, addr, add,
|
||||
|
@ -423,7 +425,9 @@ wpa_sm_tdls_peer_addset(struct wpa_sm *sm, const u8 *addr, int add,
|
|||
supp_channels,
|
||||
supp_channels_len,
|
||||
supp_oper_classes,
|
||||
supp_oper_classes_len);
|
||||
supp_oper_classes_len,
|
||||
eht_capab, eht_capab_len,
|
||||
mld_link_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -354,8 +354,9 @@ static inline int wpa_drv_sta_add(struct wpa_supplicant *wpa_s,
|
|||
struct hostapd_sta_add_params *params)
|
||||
{
|
||||
if (wpa_s->driver->sta_add) {
|
||||
/* Set link_id to -1 as it's needed for AP only */
|
||||
params->mld_link_id = -1;
|
||||
/* Set link_id to -1 for non-TDLS peers */
|
||||
if (!(params->flags & WPA_STA_TDLS_PEER))
|
||||
params->mld_link_id = -1;
|
||||
return wpa_s->driver->sta_add(wpa_s->drv_priv, params);
|
||||
}
|
||||
return -1;
|
||||
|
|
|
@ -795,7 +795,9 @@ static int wpa_supplicant_tdls_peer_addset(
|
|||
const struct ieee80211_he_6ghz_band_cap *he_6ghz_he_capab,
|
||||
u8 qosinfo, int wmm, const u8 *ext_capab, size_t ext_capab_len,
|
||||
const u8 *supp_channels, size_t supp_channels_len,
|
||||
const u8 *supp_oper_classes, size_t supp_oper_classes_len)
|
||||
const u8 *supp_oper_classes, size_t supp_oper_classes_len,
|
||||
const struct ieee80211_eht_capabilities *eht_capab,
|
||||
size_t eht_capab_len, int mld_link_id)
|
||||
{
|
||||
struct wpa_supplicant *wpa_s = ctx;
|
||||
struct hostapd_sta_add_params params;
|
||||
|
@ -830,6 +832,9 @@ static int wpa_supplicant_tdls_peer_addset(
|
|||
params.supp_channels_len = supp_channels_len;
|
||||
params.supp_oper_classes = supp_oper_classes;
|
||||
params.supp_oper_classes_len = supp_oper_classes_len;
|
||||
params.eht_capab = eht_capab;
|
||||
params.eht_capab_len = eht_capab_len;
|
||||
params.mld_link_id = mld_link_id;
|
||||
|
||||
return wpa_drv_sta_add(wpa_s, ¶ms);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue