wifi: mac80211: Rename ieee80211_mle_sta_prof_size_ok()

Rename it to ieee80211_mle_basic_sta_prof_size_ok() as it
validates the size of the station profile included in
Basic Multi-Link element.

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.9bdfd263974f.I7bebd26894f33716e93cc7da576ef3215e0ba727@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Ilan Peer 2023-06-16 09:54:09 +03:00 committed by Johannes Berg
parent cf36cdef10
commit e2efec97c3
2 changed files with 6 additions and 3 deletions

View file

@ -4798,11 +4798,13 @@ struct ieee80211_mle_per_sta_profile {
} __packed;
/**
* ieee80211_mle_sta_prof_size_ok - validate multi-link element sta profile size
* ieee80211_mle_basic_sta_prof_size_ok - validate basic multi-link element sta
* profile size
* @data: pointer to the sub element data
* @len: length of the containing sub element
*/
static inline bool ieee80211_mle_sta_prof_size_ok(const u8 *data, size_t len)
static inline bool ieee80211_mle_basic_sta_prof_size_ok(const u8 *data,
size_t len)
{
const struct ieee80211_mle_per_sta_profile *prof = (const void *)data;
u16 control;

View file

@ -1496,7 +1496,8 @@ static void ieee80211_mle_get_sta_prof(struct ieee802_11_elems *elems,
if (sub->id != IEEE80211_MLE_SUBELEM_PER_STA_PROFILE)
continue;
if (!ieee80211_mle_sta_prof_size_ok(sub->data, sub->datalen))
if (!ieee80211_mle_basic_sta_prof_size_ok(sub->data,
sub->datalen))
return;
control = le16_to_cpu(prof->control);