@@ -2069,11 +2069,16 @@ static void ath11k_peer_assoc_h_smps(struct ieee80211_sta *sta,
2069
2069
const struct ieee80211_sta_ht_cap * ht_cap = & sta -> ht_cap ;
2070
2070
int smps ;
2071
2071
2072
- if (!ht_cap -> ht_supported )
2072
+ if (!ht_cap -> ht_supported && ! sta -> he_6ghz_capa . capa )
2073
2073
return ;
2074
2074
2075
- smps = ht_cap -> cap & IEEE80211_HT_CAP_SM_PS ;
2076
- smps >>= IEEE80211_HT_CAP_SM_PS_SHIFT ;
2075
+ if (ht_cap -> ht_supported ) {
2076
+ smps = ht_cap -> cap & IEEE80211_HT_CAP_SM_PS ;
2077
+ smps >>= IEEE80211_HT_CAP_SM_PS_SHIFT ;
2078
+ } else {
2079
+ smps = FIELD_GET (IEEE80211_HE_6GHZ_CAP_SM_PS ,
2080
+ le16_to_cpu (sta -> he_6ghz_capa .capa ));
2081
+ }
2077
2082
2078
2083
switch (smps ) {
2079
2084
case WLAN_HT_CAP_SM_PS_STATIC :
@@ -2361,15 +2366,20 @@ static void ath11k_peer_assoc_prepare(struct ath11k *ar,
2361
2366
2362
2367
static int ath11k_setup_peer_smps (struct ath11k * ar , struct ath11k_vif * arvif ,
2363
2368
const u8 * addr ,
2364
- const struct ieee80211_sta_ht_cap * ht_cap )
2369
+ const struct ieee80211_sta_ht_cap * ht_cap ,
2370
+ u16 he_6ghz_capa )
2365
2371
{
2366
2372
int smps ;
2367
2373
2368
- if (!ht_cap -> ht_supported )
2374
+ if (!ht_cap -> ht_supported && ! he_6ghz_capa )
2369
2375
return 0 ;
2370
2376
2371
- smps = ht_cap -> cap & IEEE80211_HT_CAP_SM_PS ;
2372
- smps >>= IEEE80211_HT_CAP_SM_PS_SHIFT ;
2377
+ if (ht_cap -> ht_supported ) {
2378
+ smps = ht_cap -> cap & IEEE80211_HT_CAP_SM_PS ;
2379
+ smps >>= IEEE80211_HT_CAP_SM_PS_SHIFT ;
2380
+ } else {
2381
+ smps = FIELD_GET (IEEE80211_HE_6GHZ_CAP_SM_PS , he_6ghz_capa );
2382
+ }
2373
2383
2374
2384
if (smps >= ARRAY_SIZE (ath11k_smps_map ))
2375
2385
return - EINVAL ;
@@ -2422,7 +2432,8 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw,
2422
2432
}
2423
2433
2424
2434
ret = ath11k_setup_peer_smps (ar , arvif , bss_conf -> bssid ,
2425
- & ap_sta -> ht_cap );
2435
+ & ap_sta -> ht_cap ,
2436
+ le16_to_cpu (ap_sta -> he_6ghz_capa .capa ));
2426
2437
if (ret ) {
2427
2438
ath11k_warn (ar -> ab , "failed to setup peer SMPS for vdev %d: %d\n" ,
2428
2439
arvif -> vdev_id , ret );
@@ -3714,7 +3725,7 @@ static int ath11k_station_assoc(struct ath11k *ar,
3714
3725
return 0 ;
3715
3726
3716
3727
ret = ath11k_setup_peer_smps (ar , arvif , sta -> addr ,
3717
- & sta -> ht_cap );
3728
+ & sta -> ht_cap , le16_to_cpu ( sta -> he_6ghz_capa . capa ) );
3718
3729
if (ret ) {
3719
3730
ath11k_warn (ar -> ab , "failed to setup peer SMPS for vdev %d: %d\n" ,
3720
3731
arvif -> vdev_id , ret );
@@ -7661,7 +7672,7 @@ static int __ath11k_mac_register(struct ath11k *ar)
7661
7672
* for each band for a dual band capable radio. It will be tricky to
7662
7673
* handle it when the ht capability different for each band.
7663
7674
*/
7664
- if (ht_cap & WMI_HT_CAP_DYNAMIC_SMPS )
7675
+ if (ht_cap & WMI_HT_CAP_DYNAMIC_SMPS || ar -> supports_6ghz )
7665
7676
ar -> hw -> wiphy -> features |= NL80211_FEATURE_DYNAMIC_SMPS ;
7666
7677
7667
7678
ar -> hw -> wiphy -> max_scan_ssids = WLAN_SCAN_PARAMS_MAX_SSID ;
0 commit comments