diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-15 02:19:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-15 02:19:16 -0400 |
commit | ab55570d64d5409fa940e85dd8de2594b160f826 (patch) | |
tree | 4010f080f2631e046ee4b5dcb29c8df2cfb9ee7e /net | |
parent | eef9d90dcde7bb4d029b67ed36457efc4970d5a2 (diff) | |
parent | 8713a7ccd88d93d9f8a72436088d6627c82490db (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 6 | ||||
-rw-r--r-- | net/mac80211/debugfs_sta.c | 11 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 6 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 3 | ||||
-rw-r--r-- | net/mac80211/scan.c | 3 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 7 | ||||
-rw-r--r-- | net/mac80211/sta_info.h | 1 | ||||
-rw-r--r-- | net/mac80211/util.c | 8 | ||||
-rw-r--r-- | net/mac80211/wext.c | 2 | ||||
-rw-r--r-- | net/wireless/core.c | 5 |
10 files changed, 36 insertions, 16 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 2a4515623776..2ad504fc3414 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -545,8 +545,12 @@ static int netdev_notify(struct notifier_block *nb, | |||
545 | 545 | ||
546 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 546 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
547 | 547 | ||
548 | sprintf(buf, "netdev:%s", dev->name); | ||
549 | dir = sdata->debugfsdir; | 548 | dir = sdata->debugfsdir; |
549 | |||
550 | if (!dir) | ||
551 | return 0; | ||
552 | |||
553 | sprintf(buf, "netdev:%s", dev->name); | ||
550 | if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf)) | 554 | if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf)) |
551 | printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs " | 555 | printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs " |
552 | "dir to %s\n", buf); | 556 | "dir to %s\n", buf); |
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index b9902e425f09..189d0bafa91a 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -249,11 +249,22 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta) | |||
249 | DECLARE_MAC_BUF(mbuf); | 249 | DECLARE_MAC_BUF(mbuf); |
250 | u8 *mac; | 250 | u8 *mac; |
251 | 251 | ||
252 | sta->debugfs.add_has_run = true; | ||
253 | |||
252 | if (!stations_dir) | 254 | if (!stations_dir) |
253 | return; | 255 | return; |
254 | 256 | ||
255 | mac = print_mac(mbuf, sta->sta.addr); | 257 | mac = print_mac(mbuf, sta->sta.addr); |
256 | 258 | ||
259 | /* | ||
260 | * This might fail due to a race condition: | ||
261 | * When mac80211 unlinks a station, the debugfs entries | ||
262 | * remain, but it is already possible to link a new | ||
263 | * station with the same address which triggers adding | ||
264 | * it to debugfs; therefore, if the old station isn't | ||
265 | * destroyed quickly enough the old station's debugfs | ||
266 | * dir might still be around. | ||
267 | */ | ||
257 | sta->debugfs.dir = debugfs_create_dir(mac, stations_dir); | 268 | sta->debugfs.dir = debugfs_create_dir(mac, stations_dir); |
258 | if (!sta->debugfs.dir) | 269 | if (!sta->debugfs.dir) |
259 | return; | 270 | return; |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 8025b294588b..156e42a003ae 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -816,8 +816,8 @@ struct ieee802_11_elems { | |||
816 | u8 *ext_supp_rates; | 816 | u8 *ext_supp_rates; |
817 | u8 *wmm_info; | 817 | u8 *wmm_info; |
818 | u8 *wmm_param; | 818 | u8 *wmm_param; |
819 | u8 *ht_cap_elem; | 819 | struct ieee80211_ht_cap *ht_cap_elem; |
820 | u8 *ht_info_elem; | 820 | struct ieee80211_ht_addt_info *ht_info_elem; |
821 | u8 *mesh_config; | 821 | u8 *mesh_config; |
822 | u8 *mesh_id; | 822 | u8 *mesh_id; |
823 | u8 *peer_link; | 823 | u8 *peer_link; |
@@ -844,8 +844,6 @@ struct ieee802_11_elems { | |||
844 | u8 ext_supp_rates_len; | 844 | u8 ext_supp_rates_len; |
845 | u8 wmm_info_len; | 845 | u8 wmm_info_len; |
846 | u8 wmm_param_len; | 846 | u8 wmm_param_len; |
847 | u8 ht_cap_elem_len; | ||
848 | u8 ht_info_elem_len; | ||
849 | u8 mesh_config_len; | 847 | u8 mesh_config_len; |
850 | u8 mesh_id_len; | 848 | u8 mesh_id_len; |
851 | u8 peer_link_len; | 849 | u8 peer_link_len; |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 49f86fa56bff..87665d7bb4f9 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1348,10 +1348,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
1348 | (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { | 1348 | (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { |
1349 | struct ieee80211_ht_bss_info bss_info; | 1349 | struct ieee80211_ht_bss_info bss_info; |
1350 | ieee80211_ht_cap_ie_to_ht_info( | 1350 | ieee80211_ht_cap_ie_to_ht_info( |
1351 | (struct ieee80211_ht_cap *) | ||
1352 | elems.ht_cap_elem, &sta->sta.ht_info); | 1351 | elems.ht_cap_elem, &sta->sta.ht_info); |
1353 | ieee80211_ht_addt_info_ie_to_ht_bss_info( | 1352 | ieee80211_ht_addt_info_ie_to_ht_bss_info( |
1354 | (struct ieee80211_ht_addt_info *) | ||
1355 | elems.ht_info_elem, &bss_info); | 1353 | elems.ht_info_elem, &bss_info); |
1356 | ieee80211_handle_ht(local, 1, &sta->sta.ht_info, &bss_info); | 1354 | ieee80211_handle_ht(local, 1, &sta->sta.ht_info, &bss_info); |
1357 | } | 1355 | } |
@@ -1709,7 +1707,6 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
1709 | struct ieee80211_ht_bss_info bss_info; | 1707 | struct ieee80211_ht_bss_info bss_info; |
1710 | 1708 | ||
1711 | ieee80211_ht_addt_info_ie_to_ht_bss_info( | 1709 | ieee80211_ht_addt_info_ie_to_ht_bss_info( |
1712 | (struct ieee80211_ht_addt_info *) | ||
1713 | elems.ht_info_elem, &bss_info); | 1710 | elems.ht_info_elem, &bss_info); |
1714 | changed |= ieee80211_handle_ht(local, 1, &conf->ht_conf, | 1711 | changed |= ieee80211_handle_ht(local, 1, &conf->ht_conf, |
1715 | &bss_info); | 1712 | &bss_info); |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 8e6685e7ae85..416bb41099f3 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -388,7 +388,8 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, | |||
388 | bss = ieee80211_bss_info_update(sdata->local, rx_status, | 388 | bss = ieee80211_bss_info_update(sdata->local, rx_status, |
389 | mgmt, skb->len, &elems, | 389 | mgmt, skb->len, &elems, |
390 | freq, beacon); | 390 | freq, beacon); |
391 | ieee80211_rx_bss_put(sdata->local, bss); | 391 | if (bss) |
392 | ieee80211_rx_bss_put(sdata->local, bss); | ||
392 | 393 | ||
393 | dev_kfree_skb(skb); | 394 | dev_kfree_skb(skb); |
394 | return RX_QUEUED; | 395 | return RX_QUEUED; |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 9b72d15bc8dc..7fef8ea1f5ec 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -635,7 +635,12 @@ static void sta_info_debugfs_add_work(struct work_struct *work) | |||
635 | 635 | ||
636 | spin_lock_irqsave(&local->sta_lock, flags); | 636 | spin_lock_irqsave(&local->sta_lock, flags); |
637 | list_for_each_entry(tmp, &local->sta_list, list) { | 637 | list_for_each_entry(tmp, &local->sta_list, list) { |
638 | if (!tmp->debugfs.dir) { | 638 | /* |
639 | * debugfs.add_has_run will be set by | ||
640 | * ieee80211_sta_debugfs_add regardless | ||
641 | * of what else it does. | ||
642 | */ | ||
643 | if (!tmp->debugfs.add_has_run) { | ||
639 | sta = tmp; | 644 | sta = tmp; |
640 | __sta_info_pin(sta); | 645 | __sta_info_pin(sta); |
641 | break; | 646 | break; |
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index a6b51862a89d..168a39a298bd 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -300,6 +300,7 @@ struct sta_info { | |||
300 | struct dentry *inactive_ms; | 300 | struct dentry *inactive_ms; |
301 | struct dentry *last_seq_ctrl; | 301 | struct dentry *last_seq_ctrl; |
302 | struct dentry *agg_status; | 302 | struct dentry *agg_status; |
303 | bool add_has_run; | ||
303 | } debugfs; | 304 | } debugfs; |
304 | #endif | 305 | #endif |
305 | 306 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index f32561ec224c..cee4884b9d06 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -529,12 +529,12 @@ void ieee802_11_parse_elems(u8 *start, size_t len, | |||
529 | elems->ext_supp_rates_len = elen; | 529 | elems->ext_supp_rates_len = elen; |
530 | break; | 530 | break; |
531 | case WLAN_EID_HT_CAPABILITY: | 531 | case WLAN_EID_HT_CAPABILITY: |
532 | elems->ht_cap_elem = pos; | 532 | if (elen >= sizeof(struct ieee80211_ht_cap)) |
533 | elems->ht_cap_elem_len = elen; | 533 | elems->ht_cap_elem = (void *)pos; |
534 | break; | 534 | break; |
535 | case WLAN_EID_HT_EXTRA_INFO: | 535 | case WLAN_EID_HT_EXTRA_INFO: |
536 | elems->ht_info_elem = pos; | 536 | if (elen >= sizeof(struct ieee80211_ht_addt_info)) |
537 | elems->ht_info_elem_len = elen; | 537 | elems->ht_info_elem = (void *)pos; |
538 | break; | 538 | break; |
539 | case WLAN_EID_MESH_ID: | 539 | case WLAN_EID_MESH_ID: |
540 | elems->mesh_id = pos; | 540 | elems->mesh_id = pos; |
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 7e0d53abde24..742f811ca416 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -775,7 +775,7 @@ static int ieee80211_ioctl_siwfrag(struct net_device *dev, | |||
775 | * configure it here */ | 775 | * configure it here */ |
776 | 776 | ||
777 | if (local->ops->set_frag_threshold) | 777 | if (local->ops->set_frag_threshold) |
778 | local->ops->set_frag_threshold( | 778 | return local->ops->set_frag_threshold( |
779 | local_to_hw(local), | 779 | local_to_hw(local), |
780 | local->fragmentation_threshold); | 780 | local->fragmentation_threshold); |
781 | 781 | ||
diff --git a/net/wireless/core.c b/net/wireless/core.c index 24fdd4cd22cb..5031db7b275b 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -184,7 +184,8 @@ int cfg80211_dev_rename(struct cfg80211_registered_device *rdev, | |||
184 | if (result) | 184 | if (result) |
185 | goto out_unlock; | 185 | goto out_unlock; |
186 | 186 | ||
187 | if (!debugfs_rename(rdev->wiphy.debugfsdir->d_parent, | 187 | if (rdev->wiphy.debugfsdir && |
188 | !debugfs_rename(rdev->wiphy.debugfsdir->d_parent, | ||
188 | rdev->wiphy.debugfsdir, | 189 | rdev->wiphy.debugfsdir, |
189 | rdev->wiphy.debugfsdir->d_parent, | 190 | rdev->wiphy.debugfsdir->d_parent, |
190 | newname)) | 191 | newname)) |
@@ -317,6 +318,8 @@ int wiphy_register(struct wiphy *wiphy) | |||
317 | drv->wiphy.debugfsdir = | 318 | drv->wiphy.debugfsdir = |
318 | debugfs_create_dir(wiphy_name(&drv->wiphy), | 319 | debugfs_create_dir(wiphy_name(&drv->wiphy), |
319 | ieee80211_debugfs_dir); | 320 | ieee80211_debugfs_dir); |
321 | if (IS_ERR(drv->wiphy.debugfsdir)) | ||
322 | drv->wiphy.debugfsdir = NULL; | ||
320 | 323 | ||
321 | res = 0; | 324 | res = 0; |
322 | out_unlock: | 325 | out_unlock: |