Skip to content

Commit d094482

Browse files
benzeajmberg-intel
authored andcommitted
wifi: mac80211: fragment per STA profile correctly
When fragmenting the ML per STA profile, the element ID should be IEEE80211_MLE_SUBELEM_PER_STA_PROFILE rather than WLAN_EID_FRAGMENT. Change the helper function to take the to be used element ID and pass the appropriate value for each of the fragmentation levels. Fixes: 81151ce ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230611121219.9b5c793d904b.I7dad952bea8e555e2f3139fbd415d0cd2b3a08c3@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 7b3b9ac commit d094482

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

net/mac80211/ieee80211_i.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2312,7 +2312,7 @@ ieee802_11_parse_elems(const u8 *start, size_t len, bool action,
23122312
return ieee802_11_parse_elems_crc(start, len, action, 0, 0, bss);
23132313
}
23142314

2315-
void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos);
2315+
void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos, u8 frag_id);
23162316

23172317
extern const int ieee802_1d_to_ac[8];
23182318

net/mac80211/mlme.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,10 +1372,11 @@ static void ieee80211_assoc_add_ml_elem(struct ieee80211_sub_if_data *sdata,
13721372
ieee80211_add_non_inheritance_elem(skb, outer_present_elems,
13731373
link_present_elems);
13741374

1375-
ieee80211_fragment_element(skb, subelem_len);
1375+
ieee80211_fragment_element(skb, subelem_len,
1376+
IEEE80211_MLE_SUBELEM_FRAGMENT);
13761377
}
13771378

1378-
ieee80211_fragment_element(skb, ml_elem_len);
1379+
ieee80211_fragment_element(skb, ml_elem_len, WLAN_EID_FRAGMENT);
13791380
}
13801381

13811382
static int ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)

net/mac80211/util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5049,7 +5049,7 @@ u8 *ieee80211_ie_build_eht_cap(u8 *pos,
50495049
return pos;
50505050
}
50515051

5052-
void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos)
5052+
void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos, u8 frag_id)
50535053
{
50545054
unsigned int elem_len;
50555055

@@ -5069,7 +5069,7 @@ void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos)
50695069
memmove(len_pos + 255 + 3, len_pos + 255 + 1, elem_len);
50705070
/* place the fragment ID */
50715071
len_pos += 255 + 1;
5072-
*len_pos = WLAN_EID_FRAGMENT;
5072+
*len_pos = frag_id;
50735073
/* and point to fragment length to update later */
50745074
len_pos++;
50755075
}

0 commit comments

Comments
 (0)