@@ -7255,6 +7255,7 @@ static int ath12k_mac_setup_iface_combinations(struct ath12k *ar)
7255
7255
{
7256
7256
struct ath12k_base * ab = ar -> ab ;
7257
7257
struct ieee80211_hw * hw = ar -> hw ;
7258
+ struct wiphy * wiphy = hw -> wiphy ;
7258
7259
struct ieee80211_iface_combination * combinations ;
7259
7260
struct ieee80211_iface_limit * limits ;
7260
7261
int n_limits , max_interfaces ;
@@ -7305,8 +7306,8 @@ static int ath12k_mac_setup_iface_combinations(struct ath12k *ar)
7305
7306
BIT (NL80211_CHAN_WIDTH_40 ) |
7306
7307
BIT (NL80211_CHAN_WIDTH_80 );
7307
7308
7308
- hw -> wiphy -> iface_combinations = combinations ;
7309
- hw -> wiphy -> n_iface_combinations = 1 ;
7309
+ wiphy -> iface_combinations = combinations ;
7310
+ wiphy -> n_iface_combinations = 1 ;
7310
7311
7311
7312
return 0 ;
7312
7313
}
@@ -7351,6 +7352,7 @@ static const struct wiphy_iftype_ext_capab ath12k_iftypes_ext_capa[] = {
7351
7352
static void __ath12k_mac_unregister (struct ath12k * ar )
7352
7353
{
7353
7354
struct ieee80211_hw * hw = ar -> hw ;
7355
+ struct wiphy * wiphy = hw -> wiphy ;
7354
7356
7355
7357
cancel_work_sync (& ar -> regd_update_work );
7356
7358
@@ -7363,8 +7365,8 @@ static void __ath12k_mac_unregister(struct ath12k *ar)
7363
7365
kfree (ar -> mac .sbands [NL80211_BAND_5GHZ ].channels );
7364
7366
kfree (ar -> mac .sbands [NL80211_BAND_6GHZ ].channels );
7365
7367
7366
- kfree (hw -> wiphy -> iface_combinations [0 ].limits );
7367
- kfree (hw -> wiphy -> iface_combinations );
7368
+ kfree (wiphy -> iface_combinations [0 ].limits );
7369
+ kfree (wiphy -> iface_combinations );
7368
7370
7369
7371
SET_IEEE80211_DEV (hw , NULL );
7370
7372
}
@@ -7389,6 +7391,7 @@ static int __ath12k_mac_register(struct ath12k *ar)
7389
7391
{
7390
7392
struct ath12k_base * ab = ar -> ab ;
7391
7393
struct ieee80211_hw * hw = ar -> hw ;
7394
+ struct wiphy * wiphy = hw -> wiphy ;
7392
7395
struct ath12k_pdev_cap * cap = & ar -> pdev -> cap ;
7393
7396
static const u32 cipher_suites [] = {
7394
7397
WLAN_CIPHER_SUITE_TKIP ,
@@ -7424,14 +7427,14 @@ static int __ath12k_mac_register(struct ath12k *ar)
7424
7427
goto err_free_channels ;
7425
7428
}
7426
7429
7427
- hw -> wiphy -> available_antennas_rx = cap -> rx_chain_mask ;
7428
- hw -> wiphy -> available_antennas_tx = cap -> tx_chain_mask ;
7430
+ wiphy -> available_antennas_rx = cap -> rx_chain_mask ;
7431
+ wiphy -> available_antennas_tx = cap -> tx_chain_mask ;
7429
7432
7430
- hw -> wiphy -> interface_modes = ab -> hw_params -> interface_modes ;
7433
+ wiphy -> interface_modes = ab -> hw_params -> interface_modes ;
7431
7434
7432
- if (hw -> wiphy -> bands [NL80211_BAND_2GHZ ] &&
7433
- hw -> wiphy -> bands [NL80211_BAND_5GHZ ] &&
7434
- hw -> wiphy -> bands [NL80211_BAND_6GHZ ])
7435
+ if (wiphy -> bands [NL80211_BAND_2GHZ ] &&
7436
+ wiphy -> bands [NL80211_BAND_5GHZ ] &&
7437
+ wiphy -> bands [NL80211_BAND_6GHZ ])
7435
7438
ieee80211_hw_set (hw , SINGLE_SCAN_ON_ALL_BANDS );
7436
7439
7437
7440
ieee80211_hw_set (hw , SIGNAL_DBM );
@@ -7457,60 +7460,59 @@ static int __ath12k_mac_register(struct ath12k *ar)
7457
7460
ieee80211_hw_set (hw , USES_RSS );
7458
7461
}
7459
7462
7460
- hw -> wiphy -> features |= NL80211_FEATURE_STATIC_SMPS ;
7461
- hw -> wiphy -> flags |= WIPHY_FLAG_IBSS_RSN ;
7463
+ wiphy -> features |= NL80211_FEATURE_STATIC_SMPS ;
7464
+ wiphy -> flags |= WIPHY_FLAG_IBSS_RSN ;
7462
7465
7463
7466
/* TODO: Check if HT capability advertised from firmware is different
7464
7467
* for each band for a dual band capable radio. It will be tricky to
7465
7468
* handle it when the ht capability different for each band.
7466
7469
*/
7467
7470
if (ht_cap & WMI_HT_CAP_DYNAMIC_SMPS )
7468
- hw -> wiphy -> features |= NL80211_FEATURE_DYNAMIC_SMPS ;
7471
+ wiphy -> features |= NL80211_FEATURE_DYNAMIC_SMPS ;
7469
7472
7470
- hw -> wiphy -> max_scan_ssids = WLAN_SCAN_PARAMS_MAX_SSID ;
7471
- hw -> wiphy -> max_scan_ie_len = WLAN_SCAN_PARAMS_MAX_IE_LEN ;
7473
+ wiphy -> max_scan_ssids = WLAN_SCAN_PARAMS_MAX_SSID ;
7474
+ wiphy -> max_scan_ie_len = WLAN_SCAN_PARAMS_MAX_IE_LEN ;
7472
7475
7473
7476
hw -> max_listen_interval = ATH12K_MAX_HW_LISTEN_INTERVAL ;
7474
7477
7475
- hw -> wiphy -> flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL ;
7476
- hw -> wiphy -> flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH ;
7477
- hw -> wiphy -> max_remain_on_channel_duration = 5000 ;
7478
+ wiphy -> flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL ;
7479
+ wiphy -> flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH ;
7480
+ wiphy -> max_remain_on_channel_duration = 5000 ;
7478
7481
7479
- hw -> wiphy -> flags |= WIPHY_FLAG_AP_UAPSD ;
7480
- hw -> wiphy -> features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
7482
+ wiphy -> flags |= WIPHY_FLAG_AP_UAPSD ;
7483
+ wiphy -> features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
7481
7484
NL80211_FEATURE_AP_SCAN ;
7482
7485
7483
7486
ar -> max_num_stations = TARGET_NUM_STATIONS ;
7484
7487
ar -> max_num_peers = TARGET_NUM_PEERS_PDEV ;
7485
7488
7486
- hw -> wiphy -> max_ap_assoc_sta = ar -> max_num_stations ;
7489
+ wiphy -> max_ap_assoc_sta = ar -> max_num_stations ;
7487
7490
7488
7491
hw -> queues = ATH12K_HW_MAX_QUEUES ;
7489
- hw -> wiphy -> tx_queue_len = ATH12K_QUEUE_LEN ;
7492
+ wiphy -> tx_queue_len = ATH12K_QUEUE_LEN ;
7490
7493
hw -> offchannel_tx_hw_queue = ATH12K_HW_MAX_QUEUES - 1 ;
7491
7494
hw -> max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE ;
7492
7495
7493
7496
hw -> vif_data_size = sizeof (struct ath12k_vif );
7494
7497
hw -> sta_data_size = sizeof (struct ath12k_sta );
7495
7498
7496
- wiphy_ext_feature_set (hw -> wiphy , NL80211_EXT_FEATURE_CQM_RSSI_LIST );
7497
- wiphy_ext_feature_set (hw -> wiphy , NL80211_EXT_FEATURE_STA_TX_PWR );
7499
+ wiphy_ext_feature_set (wiphy , NL80211_EXT_FEATURE_CQM_RSSI_LIST );
7500
+ wiphy_ext_feature_set (wiphy , NL80211_EXT_FEATURE_STA_TX_PWR );
7498
7501
7499
- hw -> wiphy -> cipher_suites = cipher_suites ;
7500
- hw -> wiphy -> n_cipher_suites = ARRAY_SIZE (cipher_suites );
7502
+ wiphy -> cipher_suites = cipher_suites ;
7503
+ wiphy -> n_cipher_suites = ARRAY_SIZE (cipher_suites );
7501
7504
7502
- hw -> wiphy -> iftype_ext_capab = ath12k_iftypes_ext_capa ;
7503
- hw -> wiphy -> num_iftype_ext_capab =
7504
- ARRAY_SIZE (ath12k_iftypes_ext_capa );
7505
+ wiphy -> iftype_ext_capab = ath12k_iftypes_ext_capa ;
7506
+ wiphy -> num_iftype_ext_capab = ARRAY_SIZE (ath12k_iftypes_ext_capa );
7505
7507
7506
7508
if (ar -> supports_6ghz ) {
7507
- wiphy_ext_feature_set (hw -> wiphy ,
7509
+ wiphy_ext_feature_set (wiphy ,
7508
7510
NL80211_EXT_FEATURE_FILS_DISCOVERY );
7509
- wiphy_ext_feature_set (hw -> wiphy ,
7511
+ wiphy_ext_feature_set (wiphy ,
7510
7512
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP );
7511
7513
}
7512
7514
7513
- wiphy_ext_feature_set (hw -> wiphy , NL80211_EXT_FEATURE_PUNCT );
7515
+ wiphy_ext_feature_set (wiphy , NL80211_EXT_FEATURE_PUNCT );
7514
7516
7515
7517
ath12k_reg_init (hw );
7516
7518
@@ -7532,7 +7534,7 @@ static int __ath12k_mac_register(struct ath12k *ar)
7532
7534
* while. But that time is so short and in practise it make
7533
7535
* a difference in real life.
7534
7536
*/
7535
- hw -> wiphy -> interface_modes &= ~BIT (NL80211_IFTYPE_MONITOR );
7537
+ wiphy -> interface_modes &= ~BIT (NL80211_IFTYPE_MONITOR );
7536
7538
7537
7539
/* Apply the regd received during initialization */
7538
7540
ret = ath12k_regd_update (ar , true);
@@ -7547,8 +7549,8 @@ static int __ath12k_mac_register(struct ath12k *ar)
7547
7549
ieee80211_unregister_hw (hw );
7548
7550
7549
7551
err_free_if_combs :
7550
- kfree (hw -> wiphy -> iface_combinations [0 ].limits );
7551
- kfree (hw -> wiphy -> iface_combinations );
7552
+ kfree (wiphy -> iface_combinations [0 ].limits );
7553
+ kfree (wiphy -> iface_combinations );
7552
7554
7553
7555
err_free_channels :
7554
7556
kfree (ar -> mac .sbands [NL80211_BAND_2GHZ ].channels );
0 commit comments