diff options
author | Paul Mackerras <paulus@samba.org> | 2008-01-23 18:07:21 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-01-23 18:07:21 -0500 |
commit | 9156ad48338e0306e508ead5c0d9986050744475 (patch) | |
tree | 37f3a90e38190052ecf3cdf9171dfdddd37b56fd /net/mac80211 | |
parent | fa28237cfcc5827553044cbd6ee52e33692b0faa (diff) | |
parent | 8f7b3d156d348b6766833cd4e272d0d19b501e64 (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ieee80211.c | 1 | ||||
-rw-r--r-- | net/mac80211/ieee80211_ioctl.c | 6 | ||||
-rw-r--r-- | net/mac80211/ieee80211_rate.c | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 8 | ||||
-rw-r--r-- | net/mac80211/rx.c | 13 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 7 |
6 files changed, 24 insertions, 13 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 505af1f067ab..6378850d8580 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -427,7 +427,6 @@ static const struct header_ops ieee80211_header_ops = { | |||
427 | void ieee80211_if_setup(struct net_device *dev) | 427 | void ieee80211_if_setup(struct net_device *dev) |
428 | { | 428 | { |
429 | ether_setup(dev); | 429 | ether_setup(dev); |
430 | dev->header_ops = &ieee80211_header_ops; | ||
431 | dev->hard_start_xmit = ieee80211_subif_start_xmit; | 430 | dev->hard_start_xmit = ieee80211_subif_start_xmit; |
432 | dev->wireless_handlers = &ieee80211_iw_handler_def; | 431 | dev->wireless_handlers = &ieee80211_iw_handler_def; |
433 | dev->set_multicast_list = ieee80211_set_multicast_list; | 432 | dev->set_multicast_list = ieee80211_set_multicast_list; |
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index 7027eed4d4ae..308bbe4a1333 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c | |||
@@ -591,7 +591,7 @@ static int ieee80211_ioctl_siwrate(struct net_device *dev, | |||
591 | sdata->bss->force_unicast_rateidx = -1; | 591 | sdata->bss->force_unicast_rateidx = -1; |
592 | if (rate->value < 0) | 592 | if (rate->value < 0) |
593 | return 0; | 593 | return 0; |
594 | for (i=0; i< mode->num_rates; i++) { | 594 | for (i=0; i < mode->num_rates; i++) { |
595 | struct ieee80211_rate *rates = &mode->rates[i]; | 595 | struct ieee80211_rate *rates = &mode->rates[i]; |
596 | int this_rate = rates->rate; | 596 | int this_rate = rates->rate; |
597 | 597 | ||
@@ -599,10 +599,10 @@ static int ieee80211_ioctl_siwrate(struct net_device *dev, | |||
599 | sdata->bss->max_ratectrl_rateidx = i; | 599 | sdata->bss->max_ratectrl_rateidx = i; |
600 | if (rate->fixed) | 600 | if (rate->fixed) |
601 | sdata->bss->force_unicast_rateidx = i; | 601 | sdata->bss->force_unicast_rateidx = i; |
602 | break; | 602 | return 0; |
603 | } | 603 | } |
604 | } | 604 | } |
605 | return 0; | 605 | return -EINVAL; |
606 | } | 606 | } |
607 | 607 | ||
608 | static int ieee80211_ioctl_giwrate(struct net_device *dev, | 608 | static int ieee80211_ioctl_giwrate(struct net_device *dev, |
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c index 3260a4a0ecc5..c3f278393741 100644 --- a/net/mac80211/ieee80211_rate.c +++ b/net/mac80211/ieee80211_rate.c | |||
@@ -60,11 +60,11 @@ void ieee80211_rate_control_unregister(struct rate_control_ops *ops) | |||
60 | list_for_each_entry(alg, &rate_ctrl_algs, list) { | 60 | list_for_each_entry(alg, &rate_ctrl_algs, list) { |
61 | if (alg->ops == ops) { | 61 | if (alg->ops == ops) { |
62 | list_del(&alg->list); | 62 | list_del(&alg->list); |
63 | kfree(alg); | ||
63 | break; | 64 | break; |
64 | } | 65 | } |
65 | } | 66 | } |
66 | mutex_unlock(&rate_ctrl_mutex); | 67 | mutex_unlock(&rate_ctrl_mutex); |
67 | kfree(alg); | ||
68 | } | 68 | } |
69 | EXPORT_SYMBOL(ieee80211_rate_control_unregister); | 69 | EXPORT_SYMBOL(ieee80211_rate_control_unregister); |
70 | 70 | ||
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 16afd24d4f6b..bee8080f2249 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -808,12 +808,8 @@ static void ieee80211_associated(struct net_device *dev, | |||
808 | sta_info_put(sta); | 808 | sta_info_put(sta); |
809 | } | 809 | } |
810 | if (disassoc) { | 810 | if (disassoc) { |
811 | union iwreq_data wrqu; | 811 | ifsta->state = IEEE80211_DISABLED; |
812 | memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); | 812 | ieee80211_set_associated(dev, ifsta, 0); |
813 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | ||
814 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); | ||
815 | mod_timer(&ifsta->timer, jiffies + | ||
816 | IEEE80211_MONITORING_INTERVAL + 30 * HZ); | ||
817 | } else { | 813 | } else { |
818 | mod_timer(&ifsta->timer, jiffies + | 814 | mod_timer(&ifsta->timer, jiffies + |
819 | IEEE80211_MONITORING_INTERVAL); | 815 | IEEE80211_MONITORING_INTERVAL); |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 00f908d9275e..a7263fc476bd 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1443,6 +1443,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1443 | struct ieee80211_sub_if_data *prev = NULL; | 1443 | struct ieee80211_sub_if_data *prev = NULL; |
1444 | struct sk_buff *skb_new; | 1444 | struct sk_buff *skb_new; |
1445 | u8 *bssid; | 1445 | u8 *bssid; |
1446 | int hdrlen; | ||
1446 | 1447 | ||
1447 | /* | 1448 | /* |
1448 | * key references and virtual interfaces are protected using RCU | 1449 | * key references and virtual interfaces are protected using RCU |
@@ -1472,6 +1473,18 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1472 | rx.fc = le16_to_cpu(hdr->frame_control); | 1473 | rx.fc = le16_to_cpu(hdr->frame_control); |
1473 | type = rx.fc & IEEE80211_FCTL_FTYPE; | 1474 | type = rx.fc & IEEE80211_FCTL_FTYPE; |
1474 | 1475 | ||
1476 | /* | ||
1477 | * Drivers are required to align the payload data to a four-byte | ||
1478 | * boundary, so the last two bits of the address where it starts | ||
1479 | * may not be set. The header is required to be directly before | ||
1480 | * the payload data, padding like atheros hardware adds which is | ||
1481 | * inbetween the 802.11 header and the payload is not supported, | ||
1482 | * the driver is required to move the 802.11 header further back | ||
1483 | * in that case. | ||
1484 | */ | ||
1485 | hdrlen = ieee80211_get_hdrlen(rx.fc); | ||
1486 | WARN_ON_ONCE(((unsigned long)(skb->data + hdrlen)) & 3); | ||
1487 | |||
1475 | if (type == IEEE80211_FTYPE_DATA || type == IEEE80211_FTYPE_MGMT) | 1488 | if (type == IEEE80211_FTYPE_DATA || type == IEEE80211_FTYPE_MGMT) |
1476 | local->dot11ReceivedFragmentCount++; | 1489 | local->dot11ReceivedFragmentCount++; |
1477 | 1490 | ||
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index e8491554a5dc..cfd8ee9adad0 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
16 | #include <linux/if_arp.h> | 16 | #include <linux/if_arp.h> |
17 | #include <linux/timer.h> | ||
17 | 18 | ||
18 | #include <net/mac80211.h> | 19 | #include <net/mac80211.h> |
19 | #include "ieee80211_i.h" | 20 | #include "ieee80211_i.h" |
@@ -306,7 +307,8 @@ static void sta_info_cleanup(unsigned long data) | |||
306 | } | 307 | } |
307 | read_unlock_bh(&local->sta_lock); | 308 | read_unlock_bh(&local->sta_lock); |
308 | 309 | ||
309 | local->sta_cleanup.expires = jiffies + STA_INFO_CLEANUP_INTERVAL; | 310 | local->sta_cleanup.expires = |
311 | round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL); | ||
310 | add_timer(&local->sta_cleanup); | 312 | add_timer(&local->sta_cleanup); |
311 | } | 313 | } |
312 | 314 | ||
@@ -345,7 +347,8 @@ void sta_info_init(struct ieee80211_local *local) | |||
345 | INIT_LIST_HEAD(&local->sta_list); | 347 | INIT_LIST_HEAD(&local->sta_list); |
346 | 348 | ||
347 | init_timer(&local->sta_cleanup); | 349 | init_timer(&local->sta_cleanup); |
348 | local->sta_cleanup.expires = jiffies + STA_INFO_CLEANUP_INTERVAL; | 350 | local->sta_cleanup.expires = |
351 | round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL); | ||
349 | local->sta_cleanup.data = (unsigned long) local; | 352 | local->sta_cleanup.data = (unsigned long) local; |
350 | local->sta_cleanup.function = sta_info_cleanup; | 353 | local->sta_cleanup.function = sta_info_cleanup; |
351 | 354 | ||