diff options
author | Lilach Edelstein <lilach.edelstein@intel.com> | 2013-10-06 13:03:32 +0200 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-12-17 19:39:37 +0200 |
commit | 1f3b0ff8eccefb0a22398bb044fa12f7e3f6f058 (patch) | |
tree | 2b2515e28295c3f5d61b5b74236505b440b2a402 /drivers/net/wireless/iwlwifi/mvm/binding.c | |
parent | 710e4d08f2ab6eed7950884ab30e684704e325ca (diff) | |
download | op-kernel-dev-1f3b0ff8eccefb0a22398bb044fa12f7e3f6f058.zip op-kernel-dev-1f3b0ff8eccefb0a22398bb044fa12f7e3f6f058.tar.gz |
iwlwifi: mvm: Add Smart FIFO support
Send firmware a Smart FIFO Configuration host command to allow
interrupt coalescing. The smart FIFO is enabled when there is
only one bound interface (other than p2p devices which are
ignored) and it is of type station, and activated while the
station is associated.
Smart Fifo allows aggragations of DMA transactions and by that
causes processor and memory controller to stay for a longer time
on lower c-states, thus saving platform power.
Firmware relies on driver to activate and disable it.
Signed-off-by: Lilach Edelstein <lilach.edelstein@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/binding.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/binding.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/binding.c b/drivers/net/wireless/iwlwifi/mvm/binding.c index 93fd145..57d3eed 100644 --- a/drivers/net/wireless/iwlwifi/mvm/binding.c +++ b/drivers/net/wireless/iwlwifi/mvm/binding.c @@ -183,15 +183,29 @@ int iwl_mvm_binding_add_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif) if (WARN_ON_ONCE(!mvmvif->phy_ctxt)) return -EINVAL; + /* + * Update SF - Disable if needed. if this fails, SF might still be on + * while many macs are bound, which is forbidden - so fail the binding. + */ + if (iwl_mvm_sf_update(mvm, vif, false)) + return -EINVAL; + return iwl_mvm_binding_update(mvm, vif, mvmvif->phy_ctxt, true); } int iwl_mvm_binding_remove_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif) { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); + int ret; if (WARN_ON_ONCE(!mvmvif->phy_ctxt)) return -EINVAL; - return iwl_mvm_binding_update(mvm, vif, mvmvif->phy_ctxt, false); + ret = iwl_mvm_binding_update(mvm, vif, mvmvif->phy_ctxt, false); + + if (!ret) + if (iwl_mvm_sf_update(mvm, vif, true)) + IWL_ERR(mvm, "Failed to update SF state\n"); + + return ret; } |