Dave,
A few more fixes targetted for 2.6.23, including a couple of warning fixes.
As usual, the individual patches are available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/fixes-davem/
Thanks,
John
---
The following changes since commit 0d4cbb5e7f60b2f1a4d8b7f6ea4cc264262c7a01:
Linus Torvalds (1):
Linux 2.6.23-rc6
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git fixes-davem
Johannes Berg (3):
cfg80211: fix initialisation if built-in
net/mac80211/wme.c: fix sparse warning
mac80211: fix initialisation when built-in
Satyam Sharma (1):
net/wireless/sysfs.c: Shut up build warning
net/mac80211/ieee80211.c | 2 +-
net/mac80211/rc80211_simple.c | 2 +-
net/mac80211/wme.c | 2 +-
net/wireless/core.c | 2 +-
net/wireless/sysfs.c | 2 ++
5 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 7286c38..ff2172f 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -5259,7 +5259,7 @@ static void __exit ieee80211_exit(void)
}
-module_init(ieee80211_init);
+subsys_initcall(ieee80211_init);
module_exit(ieee80211_exit);
MODULE_DESCRIPTION("IEEE 802.11 subsystem");
diff --git a/net/mac80211/rc80211_simple.c b/net/mac80211/rc80211_simple.c
index f6780d6..17b9f46 100644
--- a/net/mac80211/rc80211_simple.c
+++ b/net/mac80211/rc80211_simple.c
@@ -431,7 +431,7 @@ static void __exit rate_control_simple_exit(void)
}
-module_init(rate_control_simple_init);
+subsys_initcall(rate_control_simple_init);
module_exit(rate_control_simple_exit);
MODULE_DESCRIPTION("Simple rate control algorithm for ieee80211");
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 89ce815..7ab82b3 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -424,7 +424,7 @@ static int wme_qdiscop_init(struct Qdisc *qd, struct rtattr *opt)
skb_queue_head_init(&q->requeued[i]);
q->queues[i] = qdisc_create_dflt(qd->dev, &pfifo_qdisc_ops,
qd->handle);
- if (q->queues[i] == 0) {
+ if (!q->queues[i]) {
q->queues[i] = &noop_qdisc;
printk(KERN_ERR "%s child qdisc %i creation failed", dev->name, i);
}
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 7eabd55..9771451 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -213,7 +213,7 @@ out_fail_notifier:
out_fail_sysfs:
return err;
}
-module_init(cfg80211_init);
+subsys_initcall(cfg80211_init);
static void cfg80211_exit(void)
{
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c
index 88aaacd..2d5d225 100644
--- a/net/wireless/sysfs.c
+++ b/net/wireless/sysfs.c
@@ -52,12 +52,14 @@ static void wiphy_dev_release(struct device *dev)
cfg80211_dev_free(rdev);
}
+#ifdef CONFIG_HOTPLUG
static int wiphy_uevent(struct device *dev, char **envp,
int num_envp, char *buf, int size)
{
/* TODO, we probably need stuff here */
return 0;
}
+#endif
struct class ieee80211_class = {
.name = "ieee80211",
--
John W. Linville
[email protected]
On Tuesday 16 October 2007 22:31:46 John W. Linville wrote:
> Bill Moss (1):
> mac80211: honor IW_SCAN_THIS_ESSID in siwscan ioctl
>
Where did this patch come from? The original patch looked nothing like this,
and this patch changes the behavior of siwscan incorrectly. If the interface
is not STA, IBSS, or AP, scanning should not be permitted. This patch allows
scanning on any interface if a SSID is specified. NACK.
-Michael Wu
The previous IW_SCAN_THIS_ESSID patch left a hole allowing scan
requests on interfaces in inappropriate modes.
Signed-off-by: John W. Linville <[email protected]>
---
net/mac80211/ieee80211_ioctl.c | 37 +++++++++++++++++++------------------
1 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index 83e4035..e1fafb6 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -521,29 +521,30 @@ static int ieee80211_ioctl_siwscan(struct net_device *dev,
if (!netif_running(dev))
return -ENETDOWN;
+ switch (sdata->type) {
+ case IEEE80211_IF_TYPE_STA:
+ case IEEE80211_IF_TYPE_IBSS:
+ if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
+ ssid = sdata->u.sta.ssid;
+ ssid_len = sdata->u.sta.ssid_len;
+ }
+ break;
+ case IEEE80211_IF_TYPE_AP:
+ if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
+ ssid = sdata->u.ap.ssid;
+ ssid_len = sdata->u.ap.ssid_len;
+ }
+ break;
+ default:
+ return -EOPNOTSUPP;
+ }
+
+ /* if SSID was specified explicitly then use that */
if (wrqu->data.length == sizeof(struct iw_scan_req) &&
wrqu->data.flags & IW_SCAN_THIS_ESSID) {
req = (struct iw_scan_req *)extra;
ssid = req->essid;
ssid_len = req->essid_len;
- } else {
- switch (sdata->type) {
- case IEEE80211_IF_TYPE_STA:
- case IEEE80211_IF_TYPE_IBSS:
- if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
- ssid = sdata->u.sta.ssid;
- ssid_len = sdata->u.sta.ssid_len;
- }
- break;
- case IEEE80211_IF_TYPE_AP:
- if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
- ssid = sdata->u.ap.ssid;
- ssid_len = sdata->u.ap.ssid_len;
- }
- break;
- default:
- return -EOPNOTSUPP;
- }
}
return ieee80211_sta_req_scan(dev, ssid, ssid_len);
--
1.5.2.4
From: "John W. Linville" <[email protected]>
Date: Wed, 17 Oct 2007 10:54:54 -0400
> The previous IW_SCAN_THIS_ESSID patch left a hole allowing scan
> requests on interfaces in inappropriate modes.
>
> Signed-off-by: John W. Linville <[email protected]>
John I've pulled from your tree and added this patch on top.
Thanks!
On Tue, Oct 16, 2007 at 11:29:51PM -0400, Michael Wu wrote:
> On Tuesday 16 October 2007 22:31:46 John W. Linville wrote:
> > Bill Moss (1):
> > mac80211: honor IW_SCAN_THIS_ESSID in siwscan ioctl
> >
> Where did this patch come from? The original patch looked nothing like this,
> and this patch changes the behavior of siwscan incorrectly. If the interface
"Nothing like this"? I moved a conditional from inside a specific
case to outside the whole switch. Let's not overstate things.
> is not STA, IBSS, or AP, scanning should not be permitted. This patch allows
> scanning on any interface if a SSID is specified. NACK.
I refactored the patch in response to Johannes' email on 10/11 that
said "I think it should be done regardless of mode".
http://marc.info/?l=linux-wireless&m=119209214914682&w=2
I seem to have botched the repost -- sorry about that.
Looking closer, it does seem like ieee80211_sta_req_scan may not be
robust enough to handle an inappropriate interface gracefully. So,
let's add a patch that relocates the conditional after the switch,
and let the switch filter-out the bad interfaces for us.
Patch to follow (if I've figured-out git-send-email)...
John
--
John W. Linville
[email protected]