Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mac80211: handle station association response with S1G

Add support for updating the stations S1G capabilities when
an S1G association occurs.

Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Link: https://patch.msgid.link/20250617080610.756048-3-lachlan.hodges@morsemicro.com
[remove unused S1G_CAP3_MAX_MPDU_LEN_3895/_7791]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Lachlan Hodges and committed by
Johannes Berg
2a8a6b7c 5ea25567

+37
+2
include/net/mac80211.h
··· 2428 2428 * @he_cap: HE capabilities of this STA 2429 2429 * @he_6ghz_capa: on 6 GHz, holds the HE 6 GHz band capabilities 2430 2430 * @eht_cap: EHT capabilities of this STA 2431 + * @s1g_cap: S1G capabilities of this STA 2431 2432 * @agg: per-link data for multi-link aggregation 2432 2433 * @bandwidth: current bandwidth the station can receive with 2433 2434 * @rx_nss: in HT/VHT, the maximum number of spatial streams the ··· 2451 2450 struct ieee80211_sta_he_cap he_cap; 2452 2451 struct ieee80211_he_6ghz_capa he_6ghz_capa; 2453 2452 struct ieee80211_sta_eht_cap eht_cap; 2453 + struct ieee80211_sta_s1g_cap s1g_cap; 2454 2454 2455 2455 struct ieee80211_sta_aggregates agg; 2456 2456
+3
net/mac80211/ieee80211_i.h
··· 2270 2270 struct sk_buff *skb); 2271 2271 void ieee80211_s1g_status_twt_action(struct ieee80211_sub_if_data *sdata, 2272 2272 struct sk_buff *skb); 2273 + void ieee80211_s1g_cap_to_sta_s1g_cap(struct ieee80211_sub_if_data *sdata, 2274 + const struct ieee80211_s1g_cap *s1g_cap_ie, 2275 + struct link_sta_info *link_sta); 2273 2276 2274 2277 /* Spectrum management */ 2275 2278 void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
+6
net/mac80211/mlme.c
··· 5399 5399 bss_conf->epcs_support = false; 5400 5400 } 5401 5401 5402 + if (elems->s1g_oper && 5403 + link->u.mgd.conn.mode == IEEE80211_CONN_MODE_S1G && 5404 + elems->s1g_capab) 5405 + ieee80211_s1g_cap_to_sta_s1g_cap(sdata, elems->s1g_capab, 5406 + link_sta); 5407 + 5402 5408 bss_conf->twt_broadcast = 5403 5409 ieee80211_twt_bcast_support(sdata, bss_conf, sband, link_sta); 5404 5410
+26
net/mac80211/s1g.c
··· 194 194 break; 195 195 } 196 196 } 197 + 198 + void ieee80211_s1g_cap_to_sta_s1g_cap(struct ieee80211_sub_if_data *sdata, 199 + const struct ieee80211_s1g_cap *s1g_cap_ie, 200 + struct link_sta_info *link_sta) 201 + { 202 + struct ieee80211_sta_s1g_cap *s1g_cap = &link_sta->pub->s1g_cap; 203 + 204 + memset(s1g_cap, 0, sizeof(*s1g_cap)); 205 + 206 + memcpy(s1g_cap->cap, s1g_cap_ie->capab_info, sizeof(s1g_cap->cap)); 207 + memcpy(s1g_cap->nss_mcs, s1g_cap_ie->supp_mcs_nss, 208 + sizeof(s1g_cap->nss_mcs)); 209 + 210 + s1g_cap->s1g = true; 211 + 212 + /* Maximum MPDU length is 1 bit for S1G */ 213 + if (s1g_cap->cap[3] & S1G_CAP3_MAX_MPDU_LEN) { 214 + link_sta->pub->agg.max_amsdu_len = 215 + IEEE80211_MAX_MPDU_LEN_VHT_7991; 216 + } else { 217 + link_sta->pub->agg.max_amsdu_len = 218 + IEEE80211_MAX_MPDU_LEN_VHT_3895; 219 + } 220 + 221 + ieee80211_sta_recalc_aggregates(&link_sta->sta->sta); 222 + }