aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-16 22:37:51 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-16 22:37:51 -0400
commit8c95b4773dd8d0415269ffad7301ef96d75be8ee (patch)
tree996401ce91c2a652fcff690e2c8bf88f2014d307 /net/mac80211/wext.c
parentbcff122d478b774f4fd5262f35eedebe2f2fb274 (diff)
parent30b89b0f5e1313c8a5a039abeaa89248b6338d81 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.26
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