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

wifi: mac80211: Add processing of TTLM teardown frame

Add processing of negotiated TTLM tear down frame.
Handle this frame similar to the way a locally initiated
tear down is handled.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250205110958.860691076786.I32df71182c25c5f84e4534f40efe1316926b8249@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Ilan Peer and committed by
Johannes Berg
8b8a6731 282eeec9

+23 -5
+1
net/mac80211/ieee80211_i.h
··· 2777 2777 struct ieee80211_mgmt *mgmt, size_t len); 2778 2778 int ieee80211_req_neg_ttlm(struct ieee80211_sub_if_data *sdata, 2779 2779 struct cfg80211_ttlm_params *params); 2780 + void ieee80211_process_ttlm_teardown(struct ieee80211_sub_if_data *sdata); 2780 2781 2781 2782 void ieee80211_check_wbrf_support(struct ieee80211_local *local); 2782 2783 void ieee80211_add_wbrf(struct ieee80211_local *local, struct cfg80211_chan_def *chandef);
+3
net/mac80211/iface.c
··· 1552 1552 ieee80211_process_neg_ttlm_res(sdata, mgmt, 1553 1553 skb->len); 1554 1554 break; 1555 + case WLAN_PROTECTED_EHT_ACTION_TTLM_TEARDOWN: 1556 + ieee80211_process_ttlm_teardown(sdata); 1557 + break; 1555 1558 case WLAN_PROTECTED_EHT_ACTION_LINK_RECONFIG_RESP: 1556 1559 ieee80211_process_ml_reconf_resp(sdata, mgmt, 1557 1560 skb->len);
+11 -5
net/mac80211/mlme.c
··· 7705 7705 __ieee80211_disconnect(sdata); 7706 7706 } 7707 7707 7708 - static void ieee80211_teardown_ttlm_work(struct wiphy *wiphy, 7709 - struct wiphy_work *work) 7708 + void ieee80211_process_ttlm_teardown(struct ieee80211_sub_if_data *sdata) 7710 7709 { 7711 7710 u16 new_dormant_links; 7712 - struct ieee80211_sub_if_data *sdata = 7713 - container_of(work, struct ieee80211_sub_if_data, 7714 - u.mgd.teardown_ttlm_work); 7715 7711 7716 7712 if (!sdata->vif.neg_ttlm.valid) 7717 7713 return; ··· 7720 7724 new_dormant_links); 7721 7725 ieee80211_vif_cfg_change_notify(sdata, BSS_CHANGED_MLD_TTLM | 7722 7726 BSS_CHANGED_MLD_VALID_LINKS); 7727 + } 7728 + 7729 + static void ieee80211_teardown_ttlm_work(struct wiphy *wiphy, 7730 + struct wiphy_work *work) 7731 + { 7732 + struct ieee80211_sub_if_data *sdata = 7733 + container_of(work, struct ieee80211_sub_if_data, 7734 + u.mgd.teardown_ttlm_work); 7735 + 7736 + ieee80211_process_ttlm_teardown(sdata); 7723 7737 } 7724 7738 7725 7739 void ieee80211_send_teardown_neg_ttlm(struct ieee80211_vif *vif)
+8
net/mac80211/rx.c
··· 3811 3811 u.action.u.ttlm_res)) 3812 3812 goto invalid; 3813 3813 goto queue; 3814 + case WLAN_PROTECTED_EHT_ACTION_TTLM_TEARDOWN: 3815 + if (sdata->vif.type != NL80211_IFTYPE_STATION) 3816 + break; 3817 + 3818 + if (len < offsetofend(typeof(*mgmt), 3819 + u.action.u.ttlm_tear_down)) 3820 + goto invalid; 3821 + goto queue; 3814 3822 case WLAN_PROTECTED_EHT_ACTION_LINK_RECONFIG_RESP: 3815 3823 if (sdata->vif.type != NL80211_IFTYPE_STATION) 3816 3824 break;