@@ -330,6 +330,60 @@ struct ieee80211_sband_iftype_data {
330330 struct ieee80211_sta_he_cap he_cap ;
331331};
332332
333+ /**
334+ * enum ieee80211_edmg_bw_config - allowed channel bandwidth configurations
335+ *
336+ * @IEEE80211_EDMG_BW_CONFIG_4: 2.16GHz
337+ * @IEEE80211_EDMG_BW_CONFIG_5: 2.16GHz and 4.32GHz
338+ * @IEEE80211_EDMG_BW_CONFIG_6: 2.16GHz, 4.32GHz and 6.48GHz
339+ * @IEEE80211_EDMG_BW_CONFIG_7: 2.16GHz, 4.32GHz, 6.48GHz and 8.64GHz
340+ * @IEEE80211_EDMG_BW_CONFIG_8: 2.16GHz and 2.16GHz + 2.16GHz
341+ * @IEEE80211_EDMG_BW_CONFIG_9: 2.16GHz, 4.32GHz and 2.16GHz + 2.16GHz
342+ * @IEEE80211_EDMG_BW_CONFIG_10: 2.16GHz, 4.32GHz, 6.48GHz and 2.16GHz+2.16GHz
343+ * @IEEE80211_EDMG_BW_CONFIG_11: 2.16GHz, 4.32GHz, 6.48GHz, 8.64GHz and
344+ * 2.16GHz+2.16GHz
345+ * @IEEE80211_EDMG_BW_CONFIG_12: 2.16GHz, 2.16GHz + 2.16GHz and
346+ * 4.32GHz + 4.32GHz
347+ * @IEEE80211_EDMG_BW_CONFIG_13: 2.16GHz, 4.32GHz, 2.16GHz + 2.16GHz and
348+ * 4.32GHz + 4.32GHz
349+ * @IEEE80211_EDMG_BW_CONFIG_14: 2.16GHz, 4.32GHz, 6.48GHz, 2.16GHz + 2.16GHz
350+ * and 4.32GHz + 4.32GHz
351+ * @IEEE80211_EDMG_BW_CONFIG_15: 2.16GHz, 4.32GHz, 6.48GHz, 8.64GHz,
352+ * 2.16GHz + 2.16GHz and 4.32GHz + 4.32GHz
353+ */
354+ enum ieee80211_edmg_bw_config {
355+ IEEE80211_EDMG_BW_CONFIG_4 = 4 ,
356+ IEEE80211_EDMG_BW_CONFIG_5 = 5 ,
357+ IEEE80211_EDMG_BW_CONFIG_6 = 6 ,
358+ IEEE80211_EDMG_BW_CONFIG_7 = 7 ,
359+ IEEE80211_EDMG_BW_CONFIG_8 = 8 ,
360+ IEEE80211_EDMG_BW_CONFIG_9 = 9 ,
361+ IEEE80211_EDMG_BW_CONFIG_10 = 10 ,
362+ IEEE80211_EDMG_BW_CONFIG_11 = 11 ,
363+ IEEE80211_EDMG_BW_CONFIG_12 = 12 ,
364+ IEEE80211_EDMG_BW_CONFIG_13 = 13 ,
365+ IEEE80211_EDMG_BW_CONFIG_14 = 14 ,
366+ IEEE80211_EDMG_BW_CONFIG_15 = 15 ,
367+ };
368+
369+ /**
370+ * struct ieee80211_edmg - EDMG configuration
371+ *
372+ * This structure describes most essential parameters needed
373+ * to describe 802.11ay EDMG configuration
374+ *
375+ * @channels: bitmap that indicates the 2.16 GHz channel(s)
376+ * that are allowed to be used for transmissions.
377+ * Bit 0 indicates channel 1, bit 1 indicates channel 2, etc.
378+ * Set to 0 indicate EDMG not supported.
379+ * @bw_config: Channel BW Configuration subfield encodes
380+ * the allowed channel bandwidth configurations
381+ */
382+ struct ieee80211_edmg {
383+ u8 channels ;
384+ enum ieee80211_edmg_bw_config bw_config ;
385+ };
386+
333387/**
334388 * struct ieee80211_supported_band - frequency band definition
335389 *
@@ -346,6 +400,7 @@ struct ieee80211_sband_iftype_data {
346400 * @n_bitrates: Number of bitrates in @bitrates
347401 * @ht_cap: HT capabilities in this band
348402 * @vht_cap: VHT capabilities in this band
403+ * @edmg_cap: EDMG capabilities in this band
349404 * @n_iftype_data: number of iftype data entries
350405 * @iftype_data: interface type data entries. Note that the bits in
351406 * @types_mask inside this structure cannot overlap (i.e. only
@@ -360,6 +415,7 @@ struct ieee80211_supported_band {
360415 int n_bitrates ;
361416 struct ieee80211_sta_ht_cap ht_cap ;
362417 struct ieee80211_sta_vht_cap vht_cap ;
418+ struct ieee80211_edmg edmg_cap ;
363419 u16 n_iftype_data ;
364420 const struct ieee80211_sband_iftype_data * iftype_data ;
365421};
@@ -527,12 +583,17 @@ struct key_params {
527583 * @center_freq1: center frequency of first segment
528584 * @center_freq2: center frequency of second segment
529585 * (only with 80+80 MHz)
586+ * @edmg: define the EDMG channels configuration.
587+ * If edmg is requested (i.e. the .channels member is non-zero),
588+ * chan will define the primary channel and all other
589+ * parameters are ignored.
530590 */
531591struct cfg80211_chan_def {
532592 struct ieee80211_channel * chan ;
533593 enum nl80211_chan_width width ;
534594 u32 center_freq1 ;
535595 u32 center_freq2 ;
596+ struct ieee80211_edmg edmg ;
536597};
537598
538599/**
@@ -590,6 +651,19 @@ cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1,
590651 chandef1 -> center_freq2 == chandef2 -> center_freq2 );
591652}
592653
654+ /**
655+ * cfg80211_chandef_is_edmg - check if chandef represents an EDMG channel
656+ *
657+ * @chandef: the channel definition
658+ *
659+ * Return: %true if EDMG defined, %false otherwise.
660+ */
661+ static inline bool
662+ cfg80211_chandef_is_edmg (const struct cfg80211_chan_def * chandef )
663+ {
664+ return chandef -> edmg .channels || chandef -> edmg .bw_config ;
665+ }
666+
593667/**
594668 * cfg80211_chandef_compatible - check if two channel definitions are compatible
595669 * @chandef1: first channel definition
@@ -1177,15 +1251,17 @@ int cfg80211_check_station_change(struct wiphy *wiphy,
11771251 * @RATE_INFO_FLAGS_MCS: mcs field filled with HT MCS
11781252 * @RATE_INFO_FLAGS_VHT_MCS: mcs field filled with VHT MCS
11791253 * @RATE_INFO_FLAGS_SHORT_GI: 400ns guard interval
1180- * @RATE_INFO_FLAGS_60G : 60GHz MCS
1254+ * @RATE_INFO_FLAGS_DMG : 60GHz MCS
11811255 * @RATE_INFO_FLAGS_HE_MCS: HE MCS information
1256+ * @RATE_INFO_FLAGS_EDMG: 60GHz MCS in EDMG mode
11821257 */
11831258enum rate_info_flags {
11841259 RATE_INFO_FLAGS_MCS = BIT (0 ),
11851260 RATE_INFO_FLAGS_VHT_MCS = BIT (1 ),
11861261 RATE_INFO_FLAGS_SHORT_GI = BIT (2 ),
1187- RATE_INFO_FLAGS_60G = BIT (3 ),
1262+ RATE_INFO_FLAGS_DMG = BIT (3 ),
11881263 RATE_INFO_FLAGS_HE_MCS = BIT (4 ),
1264+ RATE_INFO_FLAGS_EDMG = BIT (5 ),
11891265};
11901266
11911267/**
@@ -1225,6 +1301,7 @@ enum rate_info_bw {
12251301 * @he_dcm: HE DCM value
12261302 * @he_ru_alloc: HE RU allocation (from &enum nl80211_he_ru_alloc,
12271303 * only valid if bw is %RATE_INFO_BW_HE_RU)
1304+ * @n_bonded_ch: In case of EDMG the number of bonded channels (1-4)
12281305 */
12291306struct rate_info {
12301307 u8 flags ;
@@ -1235,6 +1312,7 @@ struct rate_info {
12351312 u8 he_gi ;
12361313 u8 he_dcm ;
12371314 u8 he_ru_alloc ;
1315+ u8 n_bonded_ch ;
12381316};
12391317
12401318/**
@@ -2438,6 +2516,9 @@ struct cfg80211_bss_selection {
24382516 * @fils_erp_rrk_len: Length of @fils_erp_rrk in octets.
24392517 * @want_1x: indicates user-space supports and wants to use 802.1X driver
24402518 * offload of 4-way handshake.
2519+ * @edmg: define the EDMG channels.
2520+ * This may specify multiple channels and bonding options for the driver
2521+ * to choose from, based on BSS configuration.
24412522 */
24422523struct cfg80211_connect_params {
24432524 struct ieee80211_channel * channel ;
@@ -2471,6 +2552,7 @@ struct cfg80211_connect_params {
24712552 const u8 * fils_erp_rrk ;
24722553 size_t fils_erp_rrk_len ;
24732554 bool want_1x ;
2555+ struct ieee80211_edmg edmg ;
24742556};
24752557
24762558/**
0 commit comments