mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-08 23:05:31 +02:00
wifi: mac80211: Rename multi_link
As a preparation to support Reconfiguration Multi Link element, rename 'multi_link' and 'multi_link_len' fields in 'struct ieee802_11_elems' to 'ml_basic' and 'ml_basic_len'. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230616094949.b11370d3066a.I34280ae3728597056a6a2f313063962206c0d581@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
a76236de58
commit
a286de1aa3
|
@ -1726,7 +1726,7 @@ struct ieee802_11_elems {
|
||||||
const struct ieee80211_aid_response_ie *aid_resp;
|
const struct ieee80211_aid_response_ie *aid_resp;
|
||||||
const struct ieee80211_eht_cap_elem *eht_cap;
|
const struct ieee80211_eht_cap_elem *eht_cap;
|
||||||
const struct ieee80211_eht_operation *eht_operation;
|
const struct ieee80211_eht_operation *eht_operation;
|
||||||
const struct ieee80211_multi_link_elem *multi_link;
|
const struct ieee80211_multi_link_elem *ml_basic;
|
||||||
|
|
||||||
/* length of them, respectively */
|
/* length of them, respectively */
|
||||||
u8 ext_capab_len;
|
u8 ext_capab_len;
|
||||||
|
@ -1751,9 +1751,10 @@ struct ieee802_11_elems {
|
||||||
u8 eht_cap_len;
|
u8 eht_cap_len;
|
||||||
|
|
||||||
/* mult-link element can be de-fragmented and thus u8 is not sufficient */
|
/* mult-link element can be de-fragmented and thus u8 is not sufficient */
|
||||||
size_t multi_link_len;
|
size_t ml_basic_len;
|
||||||
/* The element in the original IEs */
|
|
||||||
const struct element *multi_link_elem;
|
/* The basic Multi-Link element in the original IEs */
|
||||||
|
const struct element *ml_basic_elem;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* store the per station profile pointer and length in case that the
|
* store the per station profile pointer and length in case that the
|
||||||
|
|
|
@ -5277,24 +5277,24 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ieee80211_vif_is_mld(&sdata->vif)) {
|
if (ieee80211_vif_is_mld(&sdata->vif)) {
|
||||||
if (!elems->multi_link) {
|
if (!elems->ml_basic) {
|
||||||
sdata_info(sdata,
|
sdata_info(sdata,
|
||||||
"MLO association with %pM but no multi-link element in response!\n",
|
"MLO association with %pM but no multi-link element in response!\n",
|
||||||
assoc_data->ap_addr);
|
assoc_data->ap_addr);
|
||||||
goto abandon_assoc;
|
goto abandon_assoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (le16_get_bits(elems->multi_link->control,
|
if (le16_get_bits(elems->ml_basic->control,
|
||||||
IEEE80211_ML_CONTROL_TYPE) !=
|
IEEE80211_ML_CONTROL_TYPE) !=
|
||||||
IEEE80211_ML_CONTROL_TYPE_BASIC) {
|
IEEE80211_ML_CONTROL_TYPE_BASIC) {
|
||||||
sdata_info(sdata,
|
sdata_info(sdata,
|
||||||
"bad multi-link element (control=0x%x)\n",
|
"bad multi-link element (control=0x%x)\n",
|
||||||
le16_to_cpu(elems->multi_link->control));
|
le16_to_cpu(elems->ml_basic->control));
|
||||||
goto abandon_assoc;
|
goto abandon_assoc;
|
||||||
} else {
|
} else {
|
||||||
struct ieee80211_mle_basic_common_info *common;
|
struct ieee80211_mle_basic_common_info *common;
|
||||||
|
|
||||||
common = (void *)elems->multi_link->variable;
|
common = (void *)elems->ml_basic->variable;
|
||||||
|
|
||||||
if (memcmp(assoc_data->ap_addr,
|
if (memcmp(assoc_data->ap_addr,
|
||||||
common->mld_mac_addr, ETH_ALEN)) {
|
common->mld_mac_addr, ETH_ALEN)) {
|
||||||
|
|
|
@ -984,9 +984,9 @@ ieee80211_parse_extension_element(u32 *crc,
|
||||||
break;
|
break;
|
||||||
case WLAN_EID_EXT_EHT_MULTI_LINK:
|
case WLAN_EID_EXT_EHT_MULTI_LINK:
|
||||||
if (ieee80211_mle_size_ok(data, len)) {
|
if (ieee80211_mle_size_ok(data, len)) {
|
||||||
elems->multi_link_elem = (void *)elem;
|
elems->ml_basic_elem = (void *)elem;
|
||||||
elems->multi_link = (void *)data;
|
elems->ml_basic = (void *)data;
|
||||||
elems->multi_link_len = len;
|
elems->ml_basic_len = len;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1462,8 +1462,8 @@ static size_t ieee802_11_find_bssid_profile(const u8 *start, size_t len,
|
||||||
static void ieee80211_mle_get_sta_prof(struct ieee802_11_elems *elems,
|
static void ieee80211_mle_get_sta_prof(struct ieee802_11_elems *elems,
|
||||||
u8 link_id)
|
u8 link_id)
|
||||||
{
|
{
|
||||||
const struct ieee80211_multi_link_elem *ml = elems->multi_link;
|
const struct ieee80211_multi_link_elem *ml = elems->ml_basic;
|
||||||
ssize_t ml_len = elems->multi_link_len;
|
ssize_t ml_len = elems->ml_basic_len;
|
||||||
const struct element *sub;
|
const struct element *sub;
|
||||||
|
|
||||||
if (!ml || !ml_len)
|
if (!ml || !ml_len)
|
||||||
|
@ -1523,14 +1523,14 @@ static void ieee80211_mle_parse_link(struct ieee802_11_elems *elems,
|
||||||
.from_ap = params->from_ap,
|
.from_ap = params->from_ap,
|
||||||
.link_id = -1,
|
.link_id = -1,
|
||||||
};
|
};
|
||||||
ssize_t ml_len = elems->multi_link_len;
|
ssize_t ml_len = elems->ml_basic_len;
|
||||||
const struct element *non_inherit = NULL;
|
const struct element *non_inherit = NULL;
|
||||||
const u8 *end;
|
const u8 *end;
|
||||||
|
|
||||||
if (params->link_id == -1)
|
if (params->link_id == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ml_len = cfg80211_defragment_element(elems->multi_link_elem,
|
ml_len = cfg80211_defragment_element(elems->ml_basic_elem,
|
||||||
elems->ie_start,
|
elems->ie_start,
|
||||||
elems->total_len,
|
elems->total_len,
|
||||||
elems->scratch_pos,
|
elems->scratch_pos,
|
||||||
|
@ -1542,9 +1542,8 @@ static void ieee80211_mle_parse_link(struct ieee802_11_elems *elems,
|
||||||
if (ml_len < 0)
|
if (ml_len < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
elems->multi_link = (const void *)elems->scratch_pos;
|
elems->ml_basic = (const void *)elems->scratch_pos;
|
||||||
elems->multi_link_len = ml_len;
|
elems->ml_basic_len = ml_len;
|
||||||
elems->scratch_pos += ml_len;
|
|
||||||
|
|
||||||
ieee80211_mle_get_sta_prof(elems, params->link_id);
|
ieee80211_mle_get_sta_prof(elems, params->link_id);
|
||||||
prof = elems->prof;
|
prof = elems->prof;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user