hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
....@@ -1,25 +1,11 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23 *
34 * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
5
+ * Copyright (C) 2018 - 2019 Intel Corporation
46 *
57 * Portions of this file are derived from the ipw3945 project, as well
68 * as portions of the ieee80211 subsystem header files.
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of version 2 of the GNU General Public License as
10
- * published by the Free Software Foundation.
11
- *
12
- * This program is distributed in the hope that it will be useful, but WITHOUT
13
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15
- * more details.
16
- *
17
- * You should have received a copy of the GNU General Public License along with
18
- * this program; if not, write to the Free Software Foundation, Inc.,
19
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
20
- *
21
- * The full GNU General Public License is included in this distribution in the
22
- * file called LICENSE.
239 *
2410 * Contact Information:
2511 * Intel Linux Wireless <linuxwifi@intel.com>
....@@ -214,6 +200,7 @@
214200 iwl_leds_init(priv);
215201
216202 wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
203
+ wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_EXT_KEY_ID);
217204
218205 ret = ieee80211_register_hw(priv->hw);
219206 if (ret) {
....@@ -317,7 +304,7 @@
317304
318305 priv->is_open = 1;
319306 IWL_DEBUG_MAC80211(priv, "leave\n");
320
- return 0;
307
+ return ret;
321308 }
322309
323310 static void iwlagn_mac_stop(struct ieee80211_hw *hw)
....@@ -714,24 +701,6 @@
714701 return ret;
715702 }
716703
717
-static inline bool iwl_enable_rx_ampdu(const struct iwl_cfg *cfg)
718
-{
719
- if (iwlwifi_mod_params.disable_11n & IWL_DISABLE_HT_RXAGG)
720
- return false;
721
- return true;
722
-}
723
-
724
-static inline bool iwl_enable_tx_ampdu(const struct iwl_cfg *cfg)
725
-{
726
- if (iwlwifi_mod_params.disable_11n & IWL_DISABLE_HT_TXAGG)
727
- return false;
728
- if (iwlwifi_mod_params.disable_11n & IWL_ENABLE_HT_TXAGG)
729
- return true;
730
-
731
- /* disabled by default */
732
- return false;
733
-}
734
-
735704 static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
736705 struct ieee80211_vif *vif,
737706 struct ieee80211_ampdu_params *params)
....@@ -756,7 +725,7 @@
756725
757726 switch (action) {
758727 case IEEE80211_AMPDU_RX_START:
759
- if (!iwl_enable_rx_ampdu(priv->cfg))
728
+ if (!iwl_enable_rx_ampdu())
760729 break;
761730 IWL_DEBUG_HT(priv, "start Rx\n");
762731 ret = iwl_sta_rx_agg_start(priv, sta, tid, *ssn);
....@@ -768,7 +737,7 @@
768737 case IEEE80211_AMPDU_TX_START:
769738 if (!priv->trans->ops->txq_enable)
770739 break;
771
- if (!iwl_enable_tx_ampdu(priv->cfg))
740
+ if (!iwl_enable_tx_ampdu())
772741 break;
773742 IWL_DEBUG_HT(priv, "start Tx\n");
774743 ret = iwlagn_tx_agg_start(priv, vif, sta, tid, ssn);
....@@ -1131,7 +1100,7 @@
11311100 goto done;
11321101 }
11331102
1134
- scd_queues = BIT(priv->cfg->base_params->num_of_queues) - 1;
1103
+ scd_queues = BIT(priv->trans->trans_cfg->base_params->num_of_queues) - 1;
11351104 scd_queues &= ~(BIT(IWL_IPAN_CMD_QUEUE_NUM) |
11361105 BIT(IWL_DEFAULT_CMD_QUEUE_NUM));
11371106