mac80211: implement HE support for mesh
Implement the basics required for supporting high efficiency with mesh: include HE information elements in beacons, probe responses, and peering action frames, and check for compatible HE configurations when peering. Signed-off-by: Sven Eckelmann <seckelmann@datto.com> Forwarded: https://patchwork.kernel.org/patch/11029299/ Link: https://lore.kernel.org/r/20190724163359.3507-2-sven@narfation.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
a0b4496a43
commit
60ad72da55
@@ -218,9 +218,12 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
|
||||
bool include_plid = false;
|
||||
u16 peering_proto = 0;
|
||||
u8 *pos, ie_len = 4;
|
||||
u8 ie_len_he_cap;
|
||||
int hdr_len = offsetofend(struct ieee80211_mgmt, u.action.u.self_prot);
|
||||
int err = -ENOMEM;
|
||||
|
||||
ie_len_he_cap = ieee80211_ie_len_he_cap(sdata,
|
||||
NL80211_IFTYPE_MESH_POINT);
|
||||
skb = dev_alloc_skb(local->tx_headroom +
|
||||
hdr_len +
|
||||
2 + /* capability info */
|
||||
@@ -233,6 +236,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
|
||||
2 + sizeof(struct ieee80211_ht_operation) +
|
||||
2 + sizeof(struct ieee80211_vht_cap) +
|
||||
2 + sizeof(struct ieee80211_vht_operation) +
|
||||
ie_len_he_cap +
|
||||
2 + 1 + sizeof(struct ieee80211_he_operation) +
|
||||
2 + 8 + /* peering IE */
|
||||
sdata->u.mesh.ie_len);
|
||||
if (!skb)
|
||||
@@ -321,7 +326,9 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
|
||||
if (mesh_add_ht_cap_ie(sdata, skb) ||
|
||||
mesh_add_ht_oper_ie(sdata, skb) ||
|
||||
mesh_add_vht_cap_ie(sdata, skb) ||
|
||||
mesh_add_vht_oper_ie(sdata, skb))
|
||||
mesh_add_vht_oper_ie(sdata, skb) ||
|
||||
mesh_add_he_cap_ie(sdata, skb, ie_len_he_cap) ||
|
||||
mesh_add_he_oper_ie(sdata, skb))
|
||||
goto free;
|
||||
}
|
||||
|
||||
@@ -433,6 +440,9 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata,
|
||||
ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband,
|
||||
elems->vht_cap_elem, sta);
|
||||
|
||||
ieee80211_he_cap_ie_to_sta_he_cap(sdata, sband, elems->he_cap,
|
||||
elems->he_cap_len, sta);
|
||||
|
||||
if (bw != sta->sta.bandwidth)
|
||||
changed |= IEEE80211_RC_BW_CHANGED;
|
||||
|
||||
|
Reference in New Issue
Block a user