aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ieee80211/ieee80211_module.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/ieee80211/ieee80211_module.c b/net/ieee80211/ieee80211_module.c
index f16e60ee9ce9..b1c6d1f717d9 100644
--- a/net/ieee80211/ieee80211_module.c
+++ b/net/ieee80211/ieee80211_module.c
@@ -123,6 +123,13 @@ static int ieee80211_change_mtu(struct net_device *dev, int new_mtu)
123 return 0; 123 return 0;
124} 124}
125 125
126static struct net_device_stats *ieee80211_generic_get_stats(
127 struct net_device *dev)
128{
129 struct ieee80211_device *ieee = netdev_priv(dev);
130 return &ieee->stats;
131}
132
126struct net_device *alloc_ieee80211(int sizeof_priv) 133struct net_device *alloc_ieee80211(int sizeof_priv)
127{ 134{
128 struct ieee80211_device *ieee; 135 struct ieee80211_device *ieee;
@@ -140,6 +147,10 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
140 dev->hard_start_xmit = ieee80211_xmit; 147 dev->hard_start_xmit = ieee80211_xmit;
141 dev->change_mtu = ieee80211_change_mtu; 148 dev->change_mtu = ieee80211_change_mtu;
142 149
150 /* Drivers are free to override this if the generic implementation
151 * does not meet their needs. */
152 dev->get_stats = ieee80211_generic_get_stats;
153
143 ieee->dev = dev; 154 ieee->dev = dev;
144 155
145 err = ieee80211_networks_allocate(ieee); 156 err = ieee80211_networks_allocate(ieee);