diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-02-04 19:51:09 (GMT) |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-12 20:37:27 (GMT) |
commit | 06d181a8fd58031db9c114d920b40d8820380a6e (patch) | |
tree | 4b1fd3bdb5c9568f127970ff8bc9630c5b9e6c80 /net/mac80211/main.c | |
parent | 9900e4843c6c95cc951a642e337478831429be88 (diff) | |
download | linux-06d181a8fd58031db9c114d920b40d8820380a6e.tar.xz |
mac80211: add NAPI support back
NAPI was originally added to mac80211 a long time ago (by John in
commit 4e6cbfd09c66 in July 2010), but then removed years later
(by Stanislaw in commit 30c97120c6c7 in February 2013). No driver
ever used it, so that was fine.
Now I'm adding support for NAPI to our driver, so add some code
to mac80211 again to support NAPI. John was originally wrapping
some (but not nearly all NAPI-related functions), but that doesn't
scale very well with the number of functions that are there, some
of which are even only inlines. Thus, instead of doing that, let
the drivers manage the NAPI struct, except for napi_add() which is
needed so mac80211 knows how to call napi_gro_receive().
Also remove some no longer needed definitions that were left when
NAPI support was removed.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 1f7d842..b055f6a5 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -1076,6 +1076,18 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) } EXPORT_SYMBOL(ieee80211_register_hw); +void ieee80211_napi_add(struct ieee80211_hw *hw, struct napi_struct *napi, + struct net_device *napi_dev, + int (*poll)(struct napi_struct *, int), + int weight) +{ + struct ieee80211_local *local = hw_to_local(hw); + + netif_napi_add(napi_dev, napi, poll, weight); + local->napi = napi; +} +EXPORT_SYMBOL_GPL(ieee80211_napi_add); + void ieee80211_unregister_hw(struct ieee80211_hw *hw) { struct ieee80211_local *local = hw_to_local(hw); |