diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-03-21 08:30:03 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-04-13 02:35:47 -0400 |
commit | f14d6b39c0b3519f8148e1371d2149c148893b61 (patch) | |
tree | 6fecbc98089f64d552cd23a7a70ab7f599568d9d /drivers/net/wireless/iwlwifi/dvm | |
parent | 9a75b3df18477ef3bd16509bc05e83a7ce6a8019 (diff) |
iwlwifi: pcie: implement GRO without NAPI
Use the new NAPI infrastructure added to mac80211 to get
GRO. We don't really implement NAPI since we don't have
a real poll function and we never schedule a NAPI poll.
Instead of this, we collect all the packets we got from a
single interrupt and then call napi_gro_flush().
This allows us to benefit from GRO. In half duplex medium
like WiFi, its main advantage is that it reduces the number
of TCP Acks, hence improving the TCP Rx performance.
Since we call the Rx path with a spinlock held, remove
the might_sleep mention from the op_mode's API.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Ido Yariv <ido@wizery.com>
[Squash different patches and rewrite the commit message]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c index 6a6df71af1d7..6a00353768f3 100644 --- a/drivers/net/wireless/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/iwlwifi/dvm/main.c | |||
@@ -2053,6 +2053,17 @@ static bool iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) | |||
2053 | return false; | 2053 | return false; |
2054 | } | 2054 | } |
2055 | 2055 | ||
2056 | static void iwl_napi_add(struct iwl_op_mode *op_mode, | ||
2057 | struct napi_struct *napi, | ||
2058 | struct net_device *napi_dev, | ||
2059 | int (*poll)(struct napi_struct *, int), | ||
2060 | int weight) | ||
2061 | { | ||
2062 | struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); | ||
2063 | |||
2064 | ieee80211_napi_add(priv->hw, napi, napi_dev, poll, weight); | ||
2065 | } | ||
2066 | |||
2056 | static const struct iwl_op_mode_ops iwl_dvm_ops = { | 2067 | static const struct iwl_op_mode_ops iwl_dvm_ops = { |
2057 | .start = iwl_op_mode_dvm_start, | 2068 | .start = iwl_op_mode_dvm_start, |
2058 | .stop = iwl_op_mode_dvm_stop, | 2069 | .stop = iwl_op_mode_dvm_stop, |
@@ -2065,6 +2076,7 @@ static const struct iwl_op_mode_ops iwl_dvm_ops = { | |||
2065 | .cmd_queue_full = iwl_cmd_queue_full, | 2076 | .cmd_queue_full = iwl_cmd_queue_full, |
2066 | .nic_config = iwl_nic_config, | 2077 | .nic_config = iwl_nic_config, |
2067 | .wimax_active = iwl_wimax_active, | 2078 | .wimax_active = iwl_wimax_active, |
2079 | .napi_add = iwl_napi_add, | ||
2068 | }; | 2080 | }; |
2069 | 2081 | ||
2070 | /***************************************************************************** | 2082 | /***************************************************************************** |