iwlwifi: mvm: allow preventing dummy notifications
authorEran Harary <eran.harary@intel.com>
Sun, 27 Jul 2014 05:03:06 +0000 (08:03 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 14 Sep 2014 09:56:37 +0000 (12:56 +0300)
The firwmare now allows the driver to disable dummy
notifications. These notifications sent by the firmware
are an overhead for slow buses. They are still useful for
fast buses.
Add a hardware switch to prevent these notifications only
on devices that work on slow buses.

Signed-off-by: Eran <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/iwl-8000.c
drivers/net/wireless/iwlwifi/iwl-config.h
drivers/net/wireless/iwlwifi/iwl-fw.h
drivers/net/wireless/iwlwifi/mvm/fw-api.h
drivers/net/wireless/iwlwifi/mvm/sf.c

index 3c576ee315fd50f835d6e6a272b9d1869778ab95..c1ef1653c7adbd54cebd99a6f88032c4be9574c9 100644 (file)
@@ -144,6 +144,7 @@ const struct iwl_cfg iwl8260_2ac_sdio_cfg = {
        .nvm_calib_ver = IWL8000_TX_POWER_VERSION,
        .default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000,
        .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO,
+       .disable_dummy_notification = true,
 };
 
 MODULE_FIRMWARE(IWL8000_MODULE_FIRMWARE(IWL8000_UCODE_API_OK));
index 1b9c77d9f1b82d72c801e4b5de1724cbe61259f0..687e9e1adbdad5295ab8dcfec4b5ff9b745b5013 100644 (file)
@@ -282,6 +282,7 @@ struct iwl_cfg {
        bool no_power_up_nic_in_init;
        const char *default_nvm_file;
        unsigned int max_rx_agg_size;
+       bool disable_dummy_notification;
 };
 
 /*
index f68cba4e04440e869ff5e69f431ad82365cb23d4..62c46eb8b99c5fff7a6fecf9b7d7eac4e9c9b639 100644 (file)
@@ -127,6 +127,7 @@ enum iwl_ucode_tlv_flag {
  * @IWL_UCODE_TLV_API_CSA_FLOW: ucode can do unbind-bind flow for CSA.
  * @IWL_UCODE_TLV_API_DISABLE_STA_TX: ucode supports tx_disable bit.
  * @IWL_UCODE_TLV_API_LMAC_SCAN: This ucode uses LMAC unified scan API.
+ * @IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF: ucode supports disabling dummy notif.
  * @IWL_UCODE_TLV_API_FRAGMENTED_SCAN: This ucode supports active dwell time
  *     longer than the passive one, which is essential for fragmented scan.
  */
@@ -137,6 +138,7 @@ enum iwl_ucode_tlv_api {
        IWL_UCODE_TLV_API_CSA_FLOW              = BIT(4),
        IWL_UCODE_TLV_API_DISABLE_STA_TX        = BIT(5),
        IWL_UCODE_TLV_API_LMAC_SCAN             = BIT(6),
+       IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF     = BIT(7),
        IWL_UCODE_TLV_API_FRAGMENTED_SCAN       = BIT(8),
 };
 
index 541b844c6b5daf3115b270a47d275a7df72b8353..b599b5288982fadaedff98d4be51ce5535f5fd6c 100644 (file)
@@ -1601,6 +1601,8 @@ enum iwl_sf_scenario {
 
 #define SF_LONG_DELAY_AGING_TIMER 1000000      /* 1 Sec */
 
+#define SF_CFG_DUMMY_NOTIF_OFF BIT(16)
+
 /**
  * Smart Fifo configuration command.
  * @state: smart fifo state, types listed in enum %iwl_sf_sate.
index f88410c7cbfbadb608b3a79fe72841a5f4bcd475..7eb78e2c240a6e7778810869b9c31dc9b1ee2850 100644 (file)
@@ -179,6 +179,10 @@ static int iwl_mvm_sf_config(struct iwl_mvm *mvm, u8 sta_id,
        struct ieee80211_sta *sta;
        int ret = 0;
 
+       if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF &&
+           mvm->cfg->disable_dummy_notification)
+               sf_cmd.state |= cpu_to_le32(SF_CFG_DUMMY_NOTIF_OFF);
+
        /*
         * If an associated AP sta changed its antenna configuration, the state
         * will remain FULL_ON but SF parameters need to be reconsidered.