diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-08-07 21:07:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-08-07 21:07:35 -0400 |
commit | 864c5a4d37b1f25e3c36dd00a09158eae455a8fd (patch) | |
tree | 7db008bc839e3d246bc905fc9b9798e79fbe000b /net | |
parent | 14ae856645dba5b9ba56b2d0627b3b9825fa37b2 (diff) | |
parent | f27b62d3e7ecca42a75f1c5d3cc225539301ba6d (diff) |
Merge branch 'fixes-davem' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 8 | ||||
-rw-r--r-- | net/mac80211/debugfs_sta.c | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211.c | 1 | ||||
-rw-r--r-- | net/mac80211/ieee80211_ioctl.c | 19 |
4 files changed, 20 insertions, 10 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 799a9208c4b4..095be91829ca 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -271,9 +271,11 @@ static void add_files(struct ieee80211_sub_if_data *sdata) | |||
271 | } | 271 | } |
272 | } | 272 | } |
273 | 273 | ||
274 | #define DEBUGFS_DEL(name, type)\ | 274 | #define DEBUGFS_DEL(name, type) \ |
275 | debugfs_remove(sdata->debugfs.type.name);\ | 275 | do { \ |
276 | sdata->debugfs.type.name = NULL; | 276 | debugfs_remove(sdata->debugfs.type.name); \ |
277 | sdata->debugfs.type.name = NULL; \ | ||
278 | } while (0) | ||
277 | 279 | ||
278 | static void del_sta_files(struct ieee80211_sub_if_data *sdata) | 280 | static void del_sta_files(struct ieee80211_sub_if_data *sdata) |
279 | { | 281 | { |
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index d41e696f3980..da34ea70276f 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -157,7 +157,7 @@ static ssize_t sta_last_seq_ctrl_read(struct file *file, char __user *userbuf, | |||
157 | struct sta_info *sta = file->private_data; | 157 | struct sta_info *sta = file->private_data; |
158 | for (i = 0; i < NUM_RX_DATA_QUEUES; i++) | 158 | for (i = 0; i < NUM_RX_DATA_QUEUES; i++) |
159 | p += scnprintf(p, sizeof(buf)+buf-p, "%x ", | 159 | p += scnprintf(p, sizeof(buf)+buf-p, "%x ", |
160 | sta->last_seq_ctrl[i]); | 160 | le16_to_cpu(sta->last_seq_ctrl[i])); |
161 | p += scnprintf(p, sizeof(buf)+buf-p, "\n"); | 161 | p += scnprintf(p, sizeof(buf)+buf-p, "\n"); |
162 | return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); | 162 | return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); |
163 | } | 163 | } |
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index c944b17d0fc0..8ec5ed192b5d 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -1650,6 +1650,7 @@ static int ieee80211_master_start_xmit(struct sk_buff *skb, | |||
1650 | if (skb_headroom(skb) < headroom) { | 1650 | if (skb_headroom(skb) < headroom) { |
1651 | if (pskb_expand_head(skb, headroom, 0, GFP_ATOMIC)) { | 1651 | if (pskb_expand_head(skb, headroom, 0, GFP_ATOMIC)) { |
1652 | dev_kfree_skb(skb); | 1652 | dev_kfree_skb(skb); |
1653 | dev_put(odev); | ||
1653 | return 0; | 1654 | return 0; |
1654 | } | 1655 | } |
1655 | } | 1656 | } |
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index d0e1ab5589db..e7904db55325 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c | |||
@@ -697,17 +697,24 @@ static int ieee80211_ioctl_siwscan(struct net_device *dev, | |||
697 | if (!netif_running(dev)) | 697 | if (!netif_running(dev)) |
698 | return -ENETDOWN; | 698 | return -ENETDOWN; |
699 | 699 | ||
700 | if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) { | 700 | switch (sdata->type) { |
701 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 701 | case IEEE80211_IF_TYPE_STA: |
702 | sdata->type == IEEE80211_IF_TYPE_IBSS) { | 702 | case IEEE80211_IF_TYPE_IBSS: |
703 | if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) { | ||
703 | ssid = sdata->u.sta.ssid; | 704 | ssid = sdata->u.sta.ssid; |
704 | ssid_len = sdata->u.sta.ssid_len; | 705 | ssid_len = sdata->u.sta.ssid_len; |
705 | } else if (sdata->type == IEEE80211_IF_TYPE_AP) { | 706 | } |
707 | break; | ||
708 | case IEEE80211_IF_TYPE_AP: | ||
709 | if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) { | ||
706 | ssid = sdata->u.ap.ssid; | 710 | ssid = sdata->u.ap.ssid; |
707 | ssid_len = sdata->u.ap.ssid_len; | 711 | ssid_len = sdata->u.ap.ssid_len; |
708 | } else | 712 | } |
709 | return -EINVAL; | 713 | break; |
714 | default: | ||
715 | return -EOPNOTSUPP; | ||
710 | } | 716 | } |
717 | |||
711 | return ieee80211_sta_req_scan(dev, ssid, ssid_len); | 718 | return ieee80211_sta_req_scan(dev, ssid, ssid_len); |
712 | } | 719 | } |
713 | 720 | ||