aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index d767cfb9b45f..b055f6a55c68 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -893,10 +893,15 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
893 /* mac80211 supports control port protocol changing */ 893 /* mac80211 supports control port protocol changing */
894 local->hw.wiphy->flags |= WIPHY_FLAG_CONTROL_PORT_PROTOCOL; 894 local->hw.wiphy->flags |= WIPHY_FLAG_CONTROL_PORT_PROTOCOL;
895 895
896 if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) 896 if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) {
897 local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; 897 local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
898 else if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) 898 } else if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) {
899 local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; 899 local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC;
900 if (hw->max_signal <= 0) {
901 result = -EINVAL;
902 goto fail_wiphy_register;
903 }
904 }
900 905
901 WARN((local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD) 906 WARN((local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)
902 && (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK), 907 && (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK),
@@ -1071,6 +1076,18 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
1071} 1076}
1072EXPORT_SYMBOL(ieee80211_register_hw); 1077EXPORT_SYMBOL(ieee80211_register_hw);
1073 1078
1079void ieee80211_napi_add(struct ieee80211_hw *hw, struct napi_struct *napi,
1080 struct net_device *napi_dev,
1081 int (*poll)(struct napi_struct *, int),
1082 int weight)
1083{
1084 struct ieee80211_local *local = hw_to_local(hw);
1085
1086 netif_napi_add(napi_dev, napi, poll, weight);
1087 local->napi = napi;
1088}
1089EXPORT_SYMBOL_GPL(ieee80211_napi_add);
1090
1074void ieee80211_unregister_hw(struct ieee80211_hw *hw) 1091void ieee80211_unregister_hw(struct ieee80211_hw *hw)
1075{ 1092{
1076 struct ieee80211_local *local = hw_to_local(hw); 1093 struct ieee80211_local *local = hw_to_local(hw);