aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r--net/mac80211/wext.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 69aed16faff3..76e1de1dc735 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -236,6 +236,9 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev,
236 case IW_MODE_ADHOC: 236 case IW_MODE_ADHOC:
237 type = IEEE80211_IF_TYPE_IBSS; 237 type = IEEE80211_IF_TYPE_IBSS;
238 break; 238 break;
239 case IW_MODE_REPEAT:
240 type = IEEE80211_IF_TYPE_WDS;
241 break;
239 case IW_MODE_MONITOR: 242 case IW_MODE_MONITOR:
240 type = IEEE80211_IF_TYPE_MNTR; 243 type = IEEE80211_IF_TYPE_MNTR;
241 break; 244 break;
@@ -980,6 +983,8 @@ static struct iw_statistics *ieee80211_get_wireless_stats(struct net_device *dev
980 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 983 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
981 struct sta_info *sta = NULL; 984 struct sta_info *sta = NULL;
982 985
986 rcu_read_lock();
987
983 if (sdata->vif.type == IEEE80211_IF_TYPE_STA || 988 if (sdata->vif.type == IEEE80211_IF_TYPE_STA ||
984 sdata->vif.type == IEEE80211_IF_TYPE_IBSS) 989 sdata->vif.type == IEEE80211_IF_TYPE_IBSS)
985 sta = sta_info_get(local, sdata->u.sta.bssid); 990 sta = sta_info_get(local, sdata->u.sta.bssid);
@@ -996,6 +1001,9 @@ static struct iw_statistics *ieee80211_get_wireless_stats(struct net_device *dev
996 wstats->qual.noise = sta->last_noise; 1001 wstats->qual.noise = sta->last_noise;
997 wstats->qual.updated = local->wstats_flags; 1002 wstats->qual.updated = local->wstats_flags;
998 } 1003 }
1004
1005 rcu_read_unlock();
1006
999 return wstats; 1007 return wstats;
1000} 1008}
1001 1009