History

cfg80211: Add data structures to capture EHT capabilities

And advertise EHT capabilities to user space when supported.

Ilan Peer committed 4 years ago

Commit 5cd5a8a1 parent 2a2c86f3 files · +102 −0Browse files

Showing the changes to include (2 of 3 files). Show all

Unified · Split

2 files
  1. include/net/cfg80211.h +63 −0
  2. include/uapi/linux/nl80211.h +12 −0
include/net/cfg80211.h+63−0
@@ -360,6 +360,48 @@ struct ieee80211_sta_he_cap { · 359 unmodified lines
360 u8 ppe_thres[IEEE80211_HE_PPE_THRES_MAX_LEN];360 u8 ppe_thres[IEEE80211_HE_PPE_THRES_MAX_LEN];
361};361};
362 362
363/**
364 * struct ieee80211_eht_mcs_nss_supp - EHT max supported NSS per MCS
365 *
366 * See P802.11be_D1.3 Table 9-401k - "Subfields of the Supported EHT-MCS
367 * and NSS Set field"
368 *
369 * @only_20mhz: MCS/NSS support for 20 MHz-only STA.
370 * @bw._80: MCS/NSS support for BW <= 80 MHz
371 * @bw._160: MCS/NSS support for BW = 160 MHz
372 * @bw._320: MCS/NSS support for BW = 320 MHz
373 */
374struct ieee80211_eht_mcs_nss_supp {
375 union {
376 struct ieee80211_eht_mcs_nss_supp_20mhz_only only_20mhz;
377 struct {
378 struct ieee80211_eht_mcs_nss_supp_bw _80;
379 struct ieee80211_eht_mcs_nss_supp_bw _160;
380 struct ieee80211_eht_mcs_nss_supp_bw _320;
381 } __packed bw;
382 } __packed;
383} __packed;
384
385#define IEEE80211_EHT_PPE_THRES_MAX_LEN 32
386
387/**
388 * struct ieee80211_sta_eht_cap - STA's EHT capabilities
389 *
390 * This structure describes most essential parameters needed
391 * to describe 802.11be EHT capabilities for a STA.
392 *
393 * @has_eht: true iff EHT data is valid.
394 * @eht_cap_elem: Fixed portion of the eht capabilities element.
395 * @eht_mcs_nss_supp: The supported NSS/MCS combinations.
396 * @eht_ppe_thres: Holds the PPE Thresholds data.
397 */
398struct ieee80211_sta_eht_cap {
399 bool has_eht;
400 struct ieee80211_eht_cap_elem_fixed eht_cap_elem;
401 struct ieee80211_eht_mcs_nss_supp eht_mcs_nss_supp;
402 u8 eht_ppe_thres[IEEE80211_EHT_PPE_THRES_MAX_LEN];
403};
404
363/**405/**
364 * struct ieee80211_sband_iftype_data - sband data per interface type406 * struct ieee80211_sband_iftype_data - sband data per interface type
365 *407 *
@@ -379,6 +421,7 @@ struct ieee80211_sband_iftype_data { · 13 unmodified lines
379 u16 types_mask;421 u16 types_mask;
380 struct ieee80211_sta_he_cap he_cap;422 struct ieee80211_sta_he_cap he_cap;
381 struct ieee80211_he_6ghz_capa he_6ghz_capa;423 struct ieee80211_he_6ghz_capa he_6ghz_capa;
424 struct ieee80211_sta_eht_cap eht_cap;
382 struct {425 struct {
383 const u8 *data;426 const u8 *data;
384 unsigned int len;427 unsigned int len;
@@ -561,6 +604,26 @@ ieee80211_get_he_6ghz_capa(const struct ieee80211_supported_band *sband, · 176 unmodified lines
561 return data->he_6ghz_capa.capa;604 return data->he_6ghz_capa.capa;
562}605}
563 606
607/**
608 * ieee80211_get_eht_iftype_cap - return ETH capabilities for an sband's iftype
609 * @sband: the sband to search for the iftype on
610 * @iftype: enum nl80211_iftype
611 *
612 * Return: pointer to the struct ieee80211_sta_eht_cap, or NULL is none found
613 */
614static inline const struct ieee80211_sta_eht_cap *
615ieee80211_get_eht_iftype_cap(const struct ieee80211_supported_band *sband,
616 enum nl80211_iftype iftype)
617{
618 const struct ieee80211_sband_iftype_data *data =
619 ieee80211_get_sband_iftype_data(sband, iftype);
620
621 if (data && data->eht_cap.has_eht)
622 return &data->eht_cap;
623
624 return NULL;
625}
626
564/**627/**
565 * wiphy_read_of_freq_limits - read frequency limits from device tree628 * wiphy_read_of_freq_limits - read frequency limits from device tree
566 *629 *
include/uapi/linux/nl80211.h+12−0
@@ -3766,6 +3766,14 @@ enum nl80211_mpath_info { · 3765 unmodified lines
3766 * given for all 6 GHz band channels3766 * given for all 6 GHz band channels
3767 * @NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS: vendor element capabilities that are3767 * @NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS: vendor element capabilities that are
3768 * advertised on this band/for this iftype (binary)3768 * advertised on this band/for this iftype (binary)
3769 * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC: EHT MAC capabilities as in EHT
3770 * capabilities element
3771 * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY: EHT PHY capabilities as in EHT
3772 * capabilities element
3773 * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET: EHT supported NSS/MCS as in EHT
3774 * capabilities element
3775 * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE: EHT PPE thresholds information as
3776 * defined in EHT capabilities element
3769 * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use3777 * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
3770 * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band attribute currently defined3778 * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band attribute currently defined
3771 */3779 */
@@ -3779,6 +3787,10 @@ enum nl80211_band_iftype_attr { · 7 unmodified lines
3779 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,3787 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
3780 NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA,3788 NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA,
3781 NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS,3789 NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS,
3790 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC,
3791 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY,
3792 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET,
3793 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE,
3782 3794
3783 /* keep last */3795 /* keep last */
3784 __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,3796 __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t