diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-29 04:49:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-29 04:49:04 -0400 |
commit | 8c3a01d0c259ec8b283c52dbeadda0122582a68b (patch) | |
tree | ebd17d756c14bf86a99185e88f73a7bba0544af9 /net | |
parent | 4c8411f8c115def968820a4df6658ccfd55d7f1a (diff) | |
parent | c97c23e38625f59e3e9869664eeeb0cab1822948 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/cfg.c | 4 | ||||
-rw-r--r-- | net/mac80211/main.c | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 29 | ||||
-rw-r--r-- | net/mac80211/rx.c | 4 | ||||
-rw-r--r-- | net/mac80211/util.c | 4 | ||||
-rw-r--r-- | net/mac80211/wext.c | 11 |
6 files changed, 31 insertions, 23 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 699d97b8de5e..a9fce4afdf21 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -672,7 +672,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, | |||
672 | if (params->vlan) { | 672 | if (params->vlan) { |
673 | sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); | 673 | sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); |
674 | 674 | ||
675 | if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN || | 675 | if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN && |
676 | sdata->vif.type != IEEE80211_IF_TYPE_AP) | 676 | sdata->vif.type != IEEE80211_IF_TYPE_AP) |
677 | return -EINVAL; | 677 | return -EINVAL; |
678 | } else | 678 | } else |
@@ -760,7 +760,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
760 | if (params->vlan && params->vlan != sta->sdata->dev) { | 760 | if (params->vlan && params->vlan != sta->sdata->dev) { |
761 | vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); | 761 | vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); |
762 | 762 | ||
763 | if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN || | 763 | if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN && |
764 | vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { | 764 | vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { |
765 | rcu_read_unlock(); | 765 | rcu_read_unlock(); |
766 | return -EINVAL; | 766 | return -EINVAL; |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 915afadb0602..5c876450b14c 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -1313,7 +1313,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local, | |||
1313 | /* | 1313 | /* |
1314 | * Clear the TX filter mask for this STA when sending the next | 1314 | * Clear the TX filter mask for this STA when sending the next |
1315 | * packet. If the STA went to power save mode, this will happen | 1315 | * packet. If the STA went to power save mode, this will happen |
1316 | * happen when it wakes up for the next time. | 1316 | * when it wakes up for the next time. |
1317 | */ | 1317 | */ |
1318 | sta->flags |= WLAN_STA_CLEAR_PS_FILT; | 1318 | sta->flags |= WLAN_STA_CLEAR_PS_FILT; |
1319 | 1319 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7cfd12e0d1e2..841278f1df8e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1325,7 +1325,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, | |||
1325 | 1325 | ||
1326 | /* prepare reordering buffer */ | 1326 | /* prepare reordering buffer */ |
1327 | tid_agg_rx->reorder_buf = | 1327 | tid_agg_rx->reorder_buf = |
1328 | kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC); | 1328 | kmalloc(buf_size * sizeof(struct sk_buff *), GFP_ATOMIC); |
1329 | if (!tid_agg_rx->reorder_buf) { | 1329 | if (!tid_agg_rx->reorder_buf) { |
1330 | if (net_ratelimit()) | 1330 | if (net_ratelimit()) |
1331 | printk(KERN_ERR "can not allocate reordering buffer " | 1331 | printk(KERN_ERR "can not allocate reordering buffer " |
@@ -1334,7 +1334,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, | |||
1334 | goto end; | 1334 | goto end; |
1335 | } | 1335 | } |
1336 | memset(tid_agg_rx->reorder_buf, 0, | 1336 | memset(tid_agg_rx->reorder_buf, 0, |
1337 | buf_size * sizeof(struct sk_buf *)); | 1337 | buf_size * sizeof(struct sk_buff *)); |
1338 | 1338 | ||
1339 | if (local->ops->ampdu_action) | 1339 | if (local->ops->ampdu_action) |
1340 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, | 1340 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, |
@@ -1614,7 +1614,7 @@ void sta_addba_resp_timer_expired(unsigned long data) | |||
1614 | * only one argument, and both sta_info and TID are needed, so init | 1614 | * only one argument, and both sta_info and TID are needed, so init |
1615 | * flow in sta_info_create gives the TID as data, while the timer_to_id | 1615 | * flow in sta_info_create gives the TID as data, while the timer_to_id |
1616 | * array gives the sta through container_of */ | 1616 | * array gives the sta through container_of */ |
1617 | u16 tid = *(int *)data; | 1617 | u16 tid = *(u8 *)data; |
1618 | struct sta_info *temp_sta = container_of((void *)data, | 1618 | struct sta_info *temp_sta = container_of((void *)data, |
1619 | struct sta_info, timer_to_tid[tid]); | 1619 | struct sta_info, timer_to_tid[tid]); |
1620 | 1620 | ||
@@ -1662,7 +1662,7 @@ timer_expired_exit: | |||
1662 | void sta_rx_agg_session_timer_expired(unsigned long data) | 1662 | void sta_rx_agg_session_timer_expired(unsigned long data) |
1663 | { | 1663 | { |
1664 | /* not an elegant detour, but there is no choice as the timer passes | 1664 | /* not an elegant detour, but there is no choice as the timer passes |
1665 | * only one argument, and verious sta_info are needed here, so init | 1665 | * only one argument, and various sta_info are needed here, so init |
1666 | * flow in sta_info_create gives the TID as data, while the timer_to_id | 1666 | * flow in sta_info_create gives the TID as data, while the timer_to_id |
1667 | * array gives the sta through container_of */ | 1667 | * array gives the sta through container_of */ |
1668 | u8 *ptid = (u8 *)data; | 1668 | u8 *ptid = (u8 *)data; |
@@ -2479,8 +2479,6 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, | |||
2479 | ifsta->state = IEEE80211_IBSS_JOINED; | 2479 | ifsta->state = IEEE80211_IBSS_JOINED; |
2480 | mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); | 2480 | mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); |
2481 | 2481 | ||
2482 | ieee80211_rx_bss_put(dev, bss); | ||
2483 | |||
2484 | return res; | 2482 | return res; |
2485 | } | 2483 | } |
2486 | 2484 | ||
@@ -3523,6 +3521,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
3523 | struct ieee80211_supported_band *sband; | 3521 | struct ieee80211_supported_band *sband; |
3524 | u8 bssid[ETH_ALEN], *pos; | 3522 | u8 bssid[ETH_ALEN], *pos; |
3525 | int i; | 3523 | int i; |
3524 | int ret; | ||
3526 | DECLARE_MAC_BUF(mac); | 3525 | DECLARE_MAC_BUF(mac); |
3527 | 3526 | ||
3528 | #if 0 | 3527 | #if 0 |
@@ -3567,7 +3566,9 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
3567 | *pos++ = (u8) (rate / 5); | 3566 | *pos++ = (u8) (rate / 5); |
3568 | } | 3567 | } |
3569 | 3568 | ||
3570 | return ieee80211_sta_join_ibss(dev, ifsta, bss); | 3569 | ret = ieee80211_sta_join_ibss(dev, ifsta, bss); |
3570 | ieee80211_rx_bss_put(dev, bss); | ||
3571 | return ret; | ||
3571 | } | 3572 | } |
3572 | 3573 | ||
3573 | 3574 | ||
@@ -3615,10 +3616,13 @@ static int ieee80211_sta_find_ibss(struct net_device *dev, | |||
3615 | (bss = ieee80211_rx_bss_get(dev, bssid, | 3616 | (bss = ieee80211_rx_bss_get(dev, bssid, |
3616 | local->hw.conf.channel->center_freq, | 3617 | local->hw.conf.channel->center_freq, |
3617 | ifsta->ssid, ifsta->ssid_len))) { | 3618 | ifsta->ssid, ifsta->ssid_len))) { |
3619 | int ret; | ||
3618 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" | 3620 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" |
3619 | " based on configured SSID\n", | 3621 | " based on configured SSID\n", |
3620 | dev->name, print_mac(mac, bssid)); | 3622 | dev->name, print_mac(mac, bssid)); |
3621 | return ieee80211_sta_join_ibss(dev, ifsta, bss); | 3623 | ret = ieee80211_sta_join_ibss(dev, ifsta, bss); |
3624 | ieee80211_rx_bss_put(dev, bss); | ||
3625 | return ret; | ||
3622 | } | 3626 | } |
3623 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 3627 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
3624 | printk(KERN_DEBUG " did not try to join ibss\n"); | 3628 | printk(KERN_DEBUG " did not try to join ibss\n"); |
@@ -4095,18 +4099,17 @@ ieee80211_sta_scan_result(struct net_device *dev, | |||
4095 | 4099 | ||
4096 | memset(&iwe, 0, sizeof(iwe)); | 4100 | memset(&iwe, 0, sizeof(iwe)); |
4097 | iwe.cmd = SIOCGIWFREQ; | 4101 | iwe.cmd = SIOCGIWFREQ; |
4098 | iwe.u.freq.m = bss->freq; | 4102 | iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); |
4099 | iwe.u.freq.e = 6; | 4103 | iwe.u.freq.e = 0; |
4100 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, | 4104 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, |
4101 | IW_EV_FREQ_LEN); | 4105 | IW_EV_FREQ_LEN); |
4102 | 4106 | ||
4103 | memset(&iwe, 0, sizeof(iwe)); | 4107 | memset(&iwe, 0, sizeof(iwe)); |
4104 | iwe.cmd = SIOCGIWFREQ; | 4108 | iwe.cmd = SIOCGIWFREQ; |
4105 | iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); | 4109 | iwe.u.freq.m = bss->freq; |
4106 | iwe.u.freq.e = 0; | 4110 | iwe.u.freq.e = 6; |
4107 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, | 4111 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, |
4108 | IW_EV_FREQ_LEN); | 4112 | IW_EV_FREQ_LEN); |
4109 | |||
4110 | memset(&iwe, 0, sizeof(iwe)); | 4113 | memset(&iwe, 0, sizeof(iwe)); |
4111 | iwe.cmd = IWEVQUAL; | 4114 | iwe.cmd = IWEVQUAL; |
4112 | iwe.u.qual.qual = bss->signal; | 4115 | iwe.u.qual.qual = bss->signal; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 1958bfb361c6..0941e5d6a522 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1091,7 +1091,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) | |||
1091 | u16 fc, hdrlen, ethertype; | 1091 | u16 fc, hdrlen, ethertype; |
1092 | u8 *payload; | 1092 | u8 *payload; |
1093 | u8 dst[ETH_ALEN]; | 1093 | u8 dst[ETH_ALEN]; |
1094 | u8 src[ETH_ALEN]; | 1094 | u8 src[ETH_ALEN] __aligned(2); |
1095 | struct sk_buff *skb = rx->skb; | 1095 | struct sk_buff *skb = rx->skb; |
1096 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1096 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1097 | DECLARE_MAC_BUF(mac); | 1097 | DECLARE_MAC_BUF(mac); |
@@ -1234,7 +1234,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) | |||
1234 | */ | 1234 | */ |
1235 | static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx) | 1235 | static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx) |
1236 | { | 1236 | { |
1237 | static const u8 pae_group_addr[ETH_ALEN] | 1237 | static const u8 pae_group_addr[ETH_ALEN] __aligned(2) |
1238 | = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; | 1238 | = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; |
1239 | struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; | 1239 | struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; |
1240 | 1240 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 131e9e6c8a32..4e97b266f907 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -34,11 +34,11 @@ void *mac80211_wiphy_privid = &mac80211_wiphy_privid; | |||
34 | 34 | ||
35 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ | 35 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ |
36 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ | 36 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ |
37 | const unsigned char rfc1042_header[] = | 37 | const unsigned char rfc1042_header[] __aligned(2) = |
38 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; | 38 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; |
39 | 39 | ||
40 | /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ | 40 | /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ |
41 | const unsigned char bridge_tunnel_header[] = | 41 | const unsigned char bridge_tunnel_header[] __aligned(2) = |
42 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; | 42 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; |
43 | 43 | ||
44 | 44 | ||
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 457ebf9e85ae..8311bb24f9f3 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -489,9 +489,14 @@ static int ieee80211_ioctl_giwap(struct net_device *dev, | |||
489 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 489 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
490 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || | 490 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
491 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { | 491 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
492 | ap_addr->sa_family = ARPHRD_ETHER; | 492 | if (sdata->u.sta.state == IEEE80211_ASSOCIATED) { |
493 | memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); | 493 | ap_addr->sa_family = ARPHRD_ETHER; |
494 | return 0; | 494 | memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); |
495 | return 0; | ||
496 | } else { | ||
497 | memset(&ap_addr->sa_data, 0, ETH_ALEN); | ||
498 | return 0; | ||
499 | } | ||
495 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { | 500 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { |
496 | ap_addr->sa_family = ARPHRD_ETHER; | 501 | ap_addr->sa_family = ARPHRD_ETHER; |
497 | memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); | 502 | memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); |