iwlwifi: unify external & internal modparam names
authorJohannes Berg <johannes.berg@intel.com>
Tue, 30 May 2017 14:45:31 +0000 (16:45 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 29 Jun 2017 10:26:25 +0000 (13:26 +0300)
Where possible (all except for "11n_disable", which isn't valid in C)
rename the internal names for module parameters to be the same as the
externally visible names, to aid finding their use etc.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
15 files changed:
drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
drivers/net/wireless/intel/iwlwifi/dvm/lib.c
drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/dvm/main.c
drivers/net/wireless/intel/iwlwifi/dvm/rx.c
drivers/net/wireless/intel/iwlwifi/dvm/rxon.c
drivers/net/wireless/intel/iwlwifi/iwl-drv.c
drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
drivers/net/wireless/intel/iwlwifi/mvm/d3.c
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/ops.c
drivers/net/wireless/intel/iwlwifi/mvm/scan.c
drivers/net/wireless/intel/iwlwifi/pcie/drv.c

index 937be04c6c71e93ae35515ec31cfe790529c467e..482ac8fdc67b99ee30fbab2d1c3d2110a1c7b3ed 100644 (file)
@@ -2308,10 +2308,10 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct file *file,
                                          size_t count, loff_t *ppos)
 {
        struct iwl_priv *priv = file->private_data;
-       bool restart_fw = iwlwifi_mod_params.restart_fw;
+       bool fw_restart = iwlwifi_mod_params.fw_restart;
        int __maybe_unused ret;
 
-       iwlwifi_mod_params.restart_fw = true;
+       iwlwifi_mod_params.fw_restart = true;
 
        mutex_lock(&priv->mutex);
 
@@ -2320,7 +2320,7 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct file *file,
 
        mutex_unlock(&priv->mutex);
 
-       iwlwifi_mod_params.restart_fw = restart_fw;
+       iwlwifi_mod_params.fw_restart = fw_restart;
 
        return count;
 }
index 74e52f7c5aa13afd8185ce41273b35beac9ed428..2b6ffbc46fa54c5c85025543057dcafe59fdb4ee 100644 (file)
@@ -1157,7 +1157,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan)
        if (ret)
                goto out;
 
-       if (!iwlwifi_mod_params.sw_crypto) {
+       if (!iwlwifi_mod_params.swcrypto) {
                /* mark all keys clear */
                priv->ucode_key_table = 0;
                ctx->key_mapping_keys = 0;
index 444c74371929bfaf3d372e46dde93065d3c7e562..82caae02dd0940926cfd88ef0964545aba0ffe1e 100644 (file)
@@ -138,7 +138,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
         * packets, so enabling it with software crypto isn't safe)
         */
        if (priv->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_MFP &&
-           !iwlwifi_mod_params.sw_crypto)
+           !iwlwifi_mod_params.swcrypto)
                ieee80211_hw_set(hw, MFP_CAPABLE);
 
        hw->sta_data_size = sizeof(struct iwl_station_priv);
@@ -171,7 +171,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
                                             WIPHY_WOWLAN_DISCONNECT |
                                             WIPHY_WOWLAN_EAP_IDENTITY_REQ |
                                             WIPHY_WOWLAN_RFKILL_RELEASE;
-               if (!iwlwifi_mod_params.sw_crypto)
+               if (!iwlwifi_mod_params.swcrypto)
                        priv->wowlan_support.flags |=
                                WIPHY_WOWLAN_SUPPORTS_GTK_REKEY |
                                WIPHY_WOWLAN_GTK_REKEY_FAILURE;
@@ -348,7 +348,7 @@ static void iwlagn_mac_set_rekey_data(struct ieee80211_hw *hw,
 {
        struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
 
-       if (iwlwifi_mod_params.sw_crypto)
+       if (iwlwifi_mod_params.swcrypto)
                return;
 
        IWL_DEBUG_MAC80211(priv, "enter\n");
@@ -624,7 +624,7 @@ static int iwlagn_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 
        IWL_DEBUG_MAC80211(priv, "enter\n");
 
-       if (iwlwifi_mod_params.sw_crypto) {
+       if (iwlwifi_mod_params.swcrypto) {
                IWL_DEBUG_MAC80211(priv, "leave - hwcrypto disabled\n");
                return -EOPNOTSUPP;
        }
index 4c8f9f1a5532bb730a8dd96f14aca2dcd44b1583..2acd94da9efeb48a65304a43032d3be8fd684660 100644 (file)
@@ -1371,7 +1371,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
 
        /* is antenna coupling more than 35dB ? */
        priv->bt_ant_couple_ok =
-               (iwlwifi_mod_params.ant_coupling >
+               (iwlwifi_mod_params.antenna_coupling >
                        IWL_BT_ANTENNA_COUPLING_THRESHOLD) ?
                        true : false;
 
@@ -1958,7 +1958,7 @@ static void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand)
        }
 
        if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) {
-               if (iwlwifi_mod_params.restart_fw) {
+               if (iwlwifi_mod_params.fw_restart) {
                        IWL_DEBUG_FW_ERRORS(priv,
                                  "Restarting adapter due to uCode error.\n");
                        queue_work(priv->workqueue, &priv->restart);
index eaad7389b67c17cc6478468437112b877bc15245..c942830af2b58ed8517c529ba4deb70c14e923f6 100644 (file)
@@ -639,7 +639,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv,
        }
 
        /* In case of HW accelerated crypto and bad decryption, drop */
-       if (!iwlwifi_mod_params.sw_crypto &&
+       if (!iwlwifi_mod_params.swcrypto &&
            iwlagn_set_decrypted_flag(priv, hdr, ampdu_status, stats))
                return;
 
index 087e579854ab2f59486798e2c48f68aef63c477f..8f3e5586eda9fb964428852cfa7d96d0d5b2fe3b 100644 (file)
@@ -1120,7 +1120,7 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
                return 0;
        }
 
-       iwl_set_rxon_hwcrypto(priv, ctx, !iwlwifi_mod_params.sw_crypto);
+       iwl_set_rxon_hwcrypto(priv, ctx, !iwlwifi_mod_params.swcrypto);
 
        IWL_DEBUG_INFO(priv,
                       "Going to commit RXON\n"
index c8d451474b649ce1d063bbe78ddb3335dbe95b3c..b5ebd0fcfbf698c4d6bc11d2790f7c726bd040f5 100644 (file)
@@ -1615,11 +1615,11 @@ void iwl_drv_stop(struct iwl_drv *drv)
 
 /* shared module parameters */
 struct iwl_mod_params iwlwifi_mod_params = {
-       .restart_fw = true,
+       .fw_restart = true,
        .bt_coex_active = true,
        .power_level = IWL_POWER_INDEX_1,
        .d0i3_disable = true,
-       .d0i3_entry_delay = 1000,
+       .d0i3_timeout = 1000,
        .uapsd_disable = IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT,
        /* the rest are 0 by default */
 };
@@ -1711,7 +1711,7 @@ module_param_named(debug, iwlwifi_mod_params.debug_level, uint,
 MODULE_PARM_DESC(debug, "debug output mask");
 #endif
 
-module_param_named(swcrypto, iwlwifi_mod_params.sw_crypto, int, S_IRUGO);
+module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, S_IRUGO);
 MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])");
 module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, S_IRUGO);
 MODULE_PARM_DESC(11n_disable,
@@ -1720,10 +1720,10 @@ module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size,
                   int, S_IRUGO);
 MODULE_PARM_DESC(amsdu_size,
                 "amsdu size 0: 12K for multi Rx queue devices, 4K for other devices 1:4K 2:8K 3:12K (default 0)");
-module_param_named(fw_restart, iwlwifi_mod_params.restart_fw, bool, S_IRUGO);
+module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, S_IRUGO);
 MODULE_PARM_DESC(fw_restart, "restart firmware in case of error (default true)");
 
-module_param_named(antenna_coupling, iwlwifi_mod_params.ant_coupling,
+module_param_named(antenna_coupling, iwlwifi_mod_params.antenna_coupling,
                   int, S_IRUGO);
 MODULE_PARM_DESC(antenna_coupling,
                 "specify antenna coupling in dB (default: 0 dB)");
@@ -1782,7 +1782,7 @@ module_param_named(fw_monitor, iwlwifi_mod_params.fw_monitor, bool, S_IRUGO);
 MODULE_PARM_DESC(fw_monitor,
                 "firmware monitor - to debug FW (default: false - needs lots of memory)");
 
-module_param_named(d0i3_timeout, iwlwifi_mod_params.d0i3_entry_delay,
+module_param_named(d0i3_timeout, iwlwifi_mod_params.d0i3_timeout,
                   uint, S_IRUGO);
 MODULE_PARM_DESC(d0i3_timeout, "Timeout to D0i3 entry when idle (ms)");
 
index 0bd85e58cc2c9785d51f5236d755401a7c584c4d..a41c46e63eb1cdaef7e3759c880d962a4cc9fb32 100644 (file)
@@ -102,32 +102,32 @@ enum iwl_uapsd_disable {
  *
  * Holds the module parameters
  *
- * @sw_crypto: using hardware encryption, default = 0
+ * @swcrypto: using hardware encryption, default = 0
  * @disable_11n: disable 11n capabilities, default = 0,
  *     use IWL_[DIS,EN]ABLE_HT_* constants
  * @amsdu_size: See &enum iwl_amsdu_size.
- * @restart_fw: restart firmware, default = 1
+ * @fw_restart: restart firmware, default = 1
  * @bt_coex_active: enable bt coex, default = true
  * @led_mode: system default, default = 0
  * @power_save: enable power save, default = false
  * @power_level: power level, default = 1
  * @debug_level: levels are IWL_DL_*
- * @ant_coupling: antenna coupling in dB, default = 0
+ * @antenna_coupling: antenna coupling in dB, default = 0
  * @nvm_file: specifies a external NVM file
  * @uapsd_disable: disable U-APSD, see &enum iwl_uapsd_disable, default =
  *     IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT
  * @d0i3_disable: disable d0i3, default = 1,
- * @d0i3_entry_delay: time to wait after no refs are taken before
+ * @d0i3_timeout: time to wait after no refs are taken before
  *     entering D0i3 (in msecs)
  * @lar_disable: disable LAR (regulatory), default = 0
  * @fw_monitor: allow to use firmware monitor
  * @disable_11ac: disable VHT capabilities, default = false.
  */
 struct iwl_mod_params {
-       int sw_crypto;
+       int swcrypto;
        unsigned int disable_11n;
        int amsdu_size;
-       bool restart_fw;
+       bool fw_restart;
        bool bt_coex_active;
        int led_mode;
        bool power_save;
@@ -135,11 +135,11 @@ struct iwl_mod_params {
 #ifdef CONFIG_IWLWIFI_DEBUG
        u32 debug_level;
 #endif
-       int ant_coupling;
+       int antenna_coupling;
        char *nvm_file;
        u32 uapsd_disable;
        bool d0i3_disable;
-       unsigned int d0i3_entry_delay;
+       unsigned int d0i3_timeout;
        bool lar_disable;
        bool fw_monitor;
        bool disable_11ac;
index ca2d11f4984e70ebac6d54222a340e2c82606fa9..5de19ea1057571f0395c4cc6b4296d60aca7c204 100644 (file)
@@ -83,7 +83,7 @@ void iwl_mvm_set_rekey_data(struct ieee80211_hw *hw,
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
        struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
 
-       if (iwlwifi_mod_params.sw_crypto)
+       if (iwlwifi_mod_params.swcrypto)
                return;
 
        mutex_lock(&mvm->mutex);
@@ -1054,7 +1054,7 @@ iwl_mvm_wowlan_config(struct iwl_mvm *mvm,
                        return ret;
        }
 
-       if (!iwlwifi_mod_params.sw_crypto) {
+       if (!iwlwifi_mod_params.swcrypto) {
                /*
                 * This needs to be unlocked due to lock ordering
                 * constraints. Since we're in the suspend path
@@ -1280,8 +1280,8 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
 
                if (!unified_image) {
                        iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
-                       if (mvm->restart_fw > 0) {
-                               mvm->restart_fw--;
+                       if (mvm->fw_restart > 0) {
+                               mvm->fw_restart--;
                                ieee80211_restart_hw(mvm->hw);
                        }
                }
index f87a43dad086192356a63d62f6671b34f6fb2233..78dde0a8d358b5f5cd5826b706ebbdac0b825b10 100644 (file)
@@ -869,8 +869,8 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct iwl_mvm *mvm, char *buf,
        mutex_lock(&mvm->mutex);
 
        /* allow one more restart that we're provoking here */
-       if (mvm->restart_fw >= 0)
-               mvm->restart_fw++;
+       if (mvm->fw_restart >= 0)
+               mvm->fw_restart++;
 
        /* take the return value to make compiler happy - it will fail anyway */
        ret = iwl_mvm_send_cmd_pdu(mvm, REPLY_ERROR, 0, 0, NULL);
index b98978d6cb21a75eec600dc83441d8d8083ac961..1cfb4c72199aa58d8710893d0cfbe76dcc482132 100644 (file)
@@ -493,7 +493,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
         * firmware will interpret some mgmt packets, so enabling it
         * with software crypto isn't safe).
         */
-       if (!iwlwifi_mod_params.sw_crypto) {
+       if (!iwlwifi_mod_params.swcrypto) {
                ieee80211_hw_set(hw, MFP_CAPABLE);
                mvm->ciphers[hw->wiphy->n_cipher_suites] =
                        WLAN_CIPHER_SUITE_AES_CMAC;
@@ -687,7 +687,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
                                     WIPHY_WOWLAN_EAP_IDENTITY_REQ |
                                     WIPHY_WOWLAN_RFKILL_RELEASE |
                                     WIPHY_WOWLAN_NET_DETECT;
-               if (!iwlwifi_mod_params.sw_crypto)
+               if (!iwlwifi_mod_params.swcrypto)
                        mvm->wowlan.flags |= WIPHY_WOWLAN_SUPPORTS_GTK_REKEY |
                                             WIPHY_WOWLAN_GTK_REKEY_FAILURE |
                                             WIPHY_WOWLAN_4WAY_HANDSHAKE;
@@ -2888,7 +2888,7 @@ static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw,
        int ret;
        u8 key_offset;
 
-       if (iwlwifi_mod_params.sw_crypto) {
+       if (iwlwifi_mod_params.swcrypto) {
                IWL_DEBUG_MAC80211(mvm, "leave - hwcrypto disabled\n");
                return -EOPNOTSUPP;
        }
index f2f1e04f471daf07283b97caa233e513e8f741ad..e1f7d273d0bd7152efcd773375311121a4c9ca7f 100644 (file)
@@ -921,7 +921,7 @@ struct iwl_mvm {
        u8 vif_count;
 
        /* -1 for always, 0 for never, >0 for that many times */
-       s8 restart_fw;
+       s8 fw_restart;
        u8 fw_dbg_conf;
        struct delayed_work fw_dump_wk;
        const struct iwl_mvm_dump_desc *fw_dump_desc;
index 695d1aead89f55b468b2b2a0de81b62b0adb0644..a0907762b0bf39ba18ea641ff0e11484f8ed7750 100644 (file)
@@ -594,7 +594,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
                        goto out_free;
        }
 
-       mvm->restart_fw = iwlwifi_mod_params.restart_fw ? -1 : 0;
+       mvm->fw_restart = iwlwifi_mod_params.fw_restart ? -1 : 0;
 
        if (!iwl_mvm_is_dqa_supported(mvm)) {
                mvm->last_agg_queue = mvm->cfg->base_params->num_of_queues - 1;
@@ -1225,7 +1225,7 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
         * If WoWLAN fw asserted, don't restart either, mac80211
         * can't recover this since we're already half suspended.
         */
-       if (!mvm->restart_fw && fw_error) {
+       if (!mvm->fw_restart && fw_error) {
                iwl_mvm_fw_dbg_collect_desc(mvm, &iwl_mvm_dump_desc_assert,
                                            NULL);
        } else if (test_and_set_bit(IWL_MVM_STATUS_IN_HW_RESTART,
@@ -1258,8 +1258,8 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
                /* don't let the transport/FW power down */
                iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
 
-               if (fw_error && mvm->restart_fw > 0)
-                       mvm->restart_fw--;
+               if (fw_error && mvm->fw_restart > 0)
+                       mvm->fw_restart--;
                ieee80211_restart_hw(mvm->hw);
        }
 }
index d48c2ecc089372661faafa2e87714bf1a26810a3..35e813bdfbe5dbc5158e78313ce7e563aace3e71 100644 (file)
@@ -1695,7 +1695,7 @@ void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)
                        mvm->scan_uid_status[uid] = 0;
                }
                uid = iwl_mvm_scan_uid_by_status(mvm, IWL_MVM_SCAN_SCHED);
-               if (uid >= 0 && !mvm->restart_fw) {
+               if (uid >= 0 && !mvm->fw_restart) {
                        ieee80211_sched_scan_stopped(mvm->hw);
                        mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED;
                        mvm->scan_uid_status[uid] = 0;
@@ -1725,7 +1725,7 @@ void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)
                 * restarted.
                 */
                if ((mvm->scan_status & IWL_MVM_SCAN_SCHED) &&
-                   !mvm->restart_fw) {
+                   !mvm->fw_restart) {
                        ieee80211_sched_scan_stopped(mvm->hw);
                        mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED;
                }
index 7bf765ba5235e420ac0f514326c76edc0991e8bf..3ca0f374c0816c55e1fc24b8a05f003306fe5433 100644 (file)
@@ -723,7 +723,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                pm_runtime_set_active(&pdev->dev);
 
                pm_runtime_set_autosuspend_delay(&pdev->dev,
-                                        iwlwifi_mod_params.d0i3_entry_delay);
+                                        iwlwifi_mod_params.d0i3_timeout);
                pm_runtime_use_autosuspend(&pdev->dev);
 
                /* We are not supposed to call pm_runtime_allow() by