Skip to contentSkip to conversation

Please pull 'fixes-davem' branch of wireless-2.6

PATCH In review John W. Linville 3 participants 5 messages Oct 17, 2007 – Oct 18, 2007 2 messages not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Dave,

A few fixes for 2.6.24. I've included some SSB ones since I wasn't sure who else should get them.

Thanks,

John

---

As usual, individual patches are available here:

http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/fixes-davem

---

The following changes since commit 65a6ec0d72a07f16719e9b7a96e1c4bae044b591:
Linus Torvalds (1):
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git fixes-davem

Bill Moss (1):
mac80211: honor IW_SCAN_THIS_ESSID in siwscan ioctl

Felix Fietkau (1):
ssb: Fix a null pointer check in mipscore init

Ingo Molnar (1):
ssb: fix build failure

Johannes Berg (3):
ieee80211: fix TKIP QoS bug
mac80211: fix set_channel regression
mac80211: reorder association debug output

John W. Linville (2):
mac80211: store channel info in sta_bss_list
mac80211: store SSID in sta_bss_list

 drivers/ssb/Kconfig                  |    4 +-
 drivers/ssb/driver_mipscore.c        |    3 +-
 net/ieee80211/ieee80211_crypt_tkip.c |    2 +-
 net/mac80211/ieee80211_ioctl.c       |   45 +++++++++++++--------
 net/mac80211/ieee80211_sta.c         |   71 +++++++++++++++++++++-------------
 5 files changed, 77 insertions(+), 48 deletions(-)
drivers/ssb/Kconfig +2 -2
index b4a5e5e..d976660 100644
@@ -22,7 +22,7 @@ config SSB
 
 config SSB_PCIHOST_POSSIBLE
 	bool
-	depends on SSB && PCI
+	depends on SSB && (PCI = y || PCI = SSB)
 	default y
 
 config SSB_PCIHOST
@@ -37,7 +37,7 @@ config SSB_PCIHOST
 
 config SSB_PCMCIAHOST_POSSIBLE
 	bool
-	depends on SSB && PCMCIA && EXPERIMENTAL
+	depends on SSB && (PCMCIA = y || PCMCIA = SSB) && EXPERIMENTAL
 	default y
 
 config SSB_PCMCIAHOST
drivers/ssb/driver_mipscore.c +2 -1
index ab8691a..3d3dd32 100644
@@ -173,7 +173,7 @@ u32 ssb_cpu_clock(struct ssb_mipscore *mcore)
 
 void ssb_mipscore_init(struct ssb_mipscore *mcore)
 {
-	struct ssb_bus *bus = mcore->dev->bus;
+	struct ssb_bus *bus;
 	struct ssb_device *dev;
 	unsigned long hz, ns;
 	unsigned int irq, i;
@@ -183,6 +183,7 @@ void ssb_mipscore_init(struct ssb_mipscore *mcore)
 
 	ssb_dprintk(KERN_INFO PFX "Initializing MIPS core...\n");
 
+	bus = mcore->dev->bus;
 	hz = ssb_clockspeed(bus);
 	if (!hz)
 		hz = 100000000;
net/ieee80211/ieee80211_crypt_tkip.c +1 -1
index 6cc54ee..72e6ab6 100644
@@ -586,7 +586,7 @@ static void michael_mic_hdr(struct sk_buff *skb, u8 * hdr)
 	if (stype & IEEE80211_STYPE_QOS_DATA) {
 		const struct ieee80211_hdr_3addrqos *qoshdr =
 			(struct ieee80211_hdr_3addrqos *)skb->data;
-		hdr[12] = qoshdr->qos_ctl & cpu_to_le16(IEEE80211_QCTL_TID);
+		hdr[12] = le16_to_cpu(qoshdr->qos_ctl) & IEEE80211_QCTL_TID;
 	} else
 		hdr[12] = 0;		/* priority */
 
net/mac80211/ieee80211_ioctl.c +28 -17

69 lines not on this page · raw message

net/mac80211/ieee80211_sta.c +44 -27

205 lines not on this page · raw message

Signature · 2 lines
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 3 lines · 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

#3 lore raw
Quoted 6 lines · Michael Wu
Quoted 3 lines · 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.

Quoted 2 lines

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

Signature · 2 lines
John W. Linville
[email protected]
#4 lore raw

PATCH 1/1 mac80211: only honor IW_SCAN_THIS_ESSID in STA, IBSS, and AP modes

The previous IW_SCAN_THIS_ESSID patch left a hole allowing scan requests on interfaces in inappropriate modes.

---
 net/mac80211/ieee80211_ioctl.c |   37 +++++++++++++++++++------------------
 1 files changed, 19 insertions(+), 18 deletions(-)
net/mac80211/ieee80211_ioctl.c +19 -18
index 83e4035..e1fafb6 100644
@@ -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);
Signature · 1 line
1.5.2.4

A message that is not in the archive (sent off-list or not yet received): 11926328942540-git-send-email-linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org

#6 lore raw

Re: [PATCH] mac80211: only honor IW_SCAN_THIS_ESSID in STA, IBSS, and AP modes

From: "John W. Linville" <[email protected]>
Date: Wed, 17 Oct 2007 10:54:54 -0400

Quoted 4 lines

The previous IW_SCAN_THIS_ESSID patch left a hole allowing scan requests on interfaces in inappropriate modes.

John I've pulled from your tree and added this patch on top.

Thanks!