Skip to contentSkip to conversation

Please pull upstream-fixes branch of wireless-2.6

PATCH John W. Linville 5 participants 9 messages Apr 20, 2006

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

The following changes since commit 0efd9323f32c137b5cf48bc6582cd08556e7cdfc:
Linus Torvalds:
Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block

are found in the git repository at:

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

Adrian Bunk:
bcm43xx: fix dyn tssi2dbm memleak

Dan Williams:
wireless/airo: clean up WEXT association and scan events wireless/atmel: send WEXT scan completion events

Erik Mouw:
bcm43xx: iw_priv_args names should be <16 characters

Jean Tourrilhes:
wext: Fix IWENCODEEXT security permissions Revert NET_RADIO Kconfig title change
wext: Fix RtNetlink ENCODE security permissions

Johannes Berg:
softmac: fix event sending
softmac: report when scanning has finished

[email protected]:
softmac: return -EAGAIN from getscan while scanning
softmac: dont send out packets while scanning
softmac: handle iw_mode properly

Michael Buesch:
softmac: fix spinlock recursion on reassoc
bcm43xx: set trans_start on TX to prevent bogus timeouts
bcm43xx: fix pctl slowclock limit calculation
bcm43xx: sysfs code cleanup

Pavel Roskin:
orinoco: fix truncating commsquality RID with the latest Symbol firmware

Randy Dunlap:
softmac uses Wiress Ext.
bcm43xx wireless: fix printk format warnings
bcm43xx: fix config menu alignment

 drivers/net/wireless/Kconfig                   |    2 
 drivers/net/wireless/airo.c                    |   46 ++++------
 drivers/net/wireless/atmel.c                   |   11 ++
 drivers/net/wireless/bcm43xx/Kconfig           |    3 +
 drivers/net/wireless/bcm43xx/bcm43xx.h         |   17 +++-
 drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c |    8 +-
 drivers/net/wireless/bcm43xx/bcm43xx_dma.c     |   13 +--
 drivers/net/wireless/bcm43xx/bcm43xx_main.c    |    2 
 drivers/net/wireless/bcm43xx/bcm43xx_phy.c     |    1 
 drivers/net/wireless/bcm43xx/bcm43xx_power.c   |  115 ++++++++++++++----------
 drivers/net/wireless/bcm43xx/bcm43xx_power.h   |    9 ++
 drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c   |  115 ++++++++++++++----------
 drivers/net/wireless/bcm43xx/bcm43xx_sysfs.h   |   16 ---
 drivers/net/wireless/bcm43xx/bcm43xx_wx.c      |    8 +-
 drivers/net/wireless/orinoco.c                 |    2 
 include/net/ieee80211softmac.h                 |    3 -
 net/core/dev.c                                 |    3 -
 net/core/wireless.c                            |    8 ++
 net/ieee80211/softmac/Kconfig                  |    1 
 net/ieee80211/softmac/ieee80211softmac_assoc.c |    5 +
 net/ieee80211/softmac/ieee80211softmac_event.c |   40 +++++++-
 net/ieee80211/softmac/ieee80211softmac_io.c    |   18 +++-
 net/ieee80211/softmac/ieee80211softmac_scan.c  |    2 
 net/ieee80211/softmac/ieee80211softmac_wx.c    |   10 ++
 24 files changed, 288 insertions(+), 170 deletions(-)
drivers/net/wireless/Kconfig +1 -1
index bad09eb..e0874cb 100644
@@ -6,7 +6,7 @@ menu "Wireless LAN (non-hamradio)"
 	depends on NETDEVICES
 
 config NET_RADIO
-	bool "Wireless LAN drivers (non-hamradio)"
+	bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions"
 	select WIRELESS_EXT
 	---help---
 	  Support for wireless LANs and everything having to do with radio,
drivers/net/wireless/airo.c +17 -29

84 lines not on this page · raw message

drivers/net/wireless/atmel.c +11 -0
index 87afa68..8606c88 100644
@@ -3463,6 +3463,7 @@ static void atmel_command_irq(struct atm
 	u8 status = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_STATUS_OFFSET));
 	u8 command = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_COMMAND_OFFSET));
 	int fast_scan;
+	union iwreq_data wrqu;
 
 	if (status == CMD_STATUS_IDLE ||
 	    status == CMD_STATUS_IN_PROGRESS)
@@ -3487,6 +3488,7 @@ static void atmel_command_irq(struct atm
 			atmel_scan(priv, 1);
 		} else {
 			int bss_index = retrieve_bss(priv);
+			int notify_scan_complete = 1;
 			if (bss_index != -1) {
 				atmel_join_bss(priv, bss_index);
 			} else if (priv->operating_mode == IW_MODE_ADHOC &&
@@ -3495,8 +3497,14 @@ static void atmel_command_irq(struct atm
 			} else {
 				priv->fast_scan = !fast_scan;
 				atmel_scan(priv, 1);
+				notify_scan_complete = 0;
 			}
 			priv->site_survey_state = SITE_SURVEY_COMPLETED;
+			if (notify_scan_complete) {
+				wrqu.data.length = 0;
+				wrqu.data.flags = 0;
+				wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
+			}
 		}
 		break;
 
@@ -3509,6 +3517,9 @@ static void atmel_command_irq(struct atm
 		priv->site_survey_state = SITE_SURVEY_COMPLETED;
 		if (priv->station_is_associated) {
 			atmel_enter_state(priv, STATION_STATE_READY);
+			wrqu.data.length = 0;
+			wrqu.data.flags = 0;
+			wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
 		} else {
 			atmel_scan(priv, 1);
 		}
drivers/net/wireless/bcm43xx/Kconfig +3 -0
index 4184656..25ea474 100644
@@ -17,8 +17,11 @@ config BCM43XX_DEBUG
 
 config BCM43XX_DMA
 	bool
+	depends on BCM43XX
+
 config BCM43XX_PIO
 	bool
+	depends on BCM43XX
 
 choice
 	prompt "BCM43xx data transfer mode"
drivers/net/wireless/bcm43xx/bcm43xx.h +14 -3
index dcadd29..2e83083 100644
@@ -15,7 +15,6 @@
 
 #include "bcm43xx_debugfs.h"
 #include "bcm43xx_leds.h"
-#include "bcm43xx_sysfs.h"
 
 
 #define PFX				KBUILD_MODNAME ": "
@@ -638,8 +637,6 @@ struct bcm43xx_key {
 };
 
 struct bcm43xx_private {
-	struct bcm43xx_sysfs sysfs;
-
 	struct ieee80211_device *ieee;
 	struct ieee80211softmac_device *softmac;
 
@@ -772,6 +769,20 @@ struct bcm43xx_private * bcm43xx_priv(st
 	return ieee80211softmac_priv(dev);
 }
 
+struct device;
+
+static inline
+struct bcm43xx_private * dev_to_bcm(struct device *dev)
+{
+	struct net_device *net_dev;
+	struct bcm43xx_private *bcm;
+
+	net_dev = dev_get_drvdata(dev);
+	bcm = bcm43xx_priv(net_dev);
+
+	return bcm;
+}
+
 
 /* Helper function, which returns a boolean.
  * TRUE, if PIO is used; FALSE, if DMA is used.
drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c +4 -4
index d2c3401..35a4fcb 100644
@@ -452,12 +452,12 @@ void bcm43xx_printk_dump(const char *dat
 	size_t i;
 	char c;
 
-	printk(KERN_INFO PFX "Data dump (%s, %u bytes):",
+	printk(KERN_INFO PFX "Data dump (%s, %zd bytes):",
 	       description, size);
 	for (i = 0; i < size; i++) {
 		c = data[i];
 		if (i % 8 == 0)
-			printk("\n" KERN_INFO PFX "0x%08x:  0x%02x, ", i, c & 0xff);
+			printk("\n" KERN_INFO PFX "0x%08zx:  0x%02x, ", i, c & 0xff);
 		else
 			printk("0x%02x, ", c & 0xff);
 	}
@@ -472,12 +472,12 @@ void bcm43xx_printk_bitdump(const unsign
 	int j;
 	const unsigned char *d;
 
-	printk(KERN_INFO PFX "*** Bitdump (%s, %u bytes, %s) ***",
+	printk(KERN_INFO PFX "*** Bitdump (%s, %zd bytes, %s) ***",
 	       description, bytes, msb_to_lsb ? "MSB to LSB" : "LSB to MSB");
 	for (i = 0; i < bytes; i++) {
 		d = data + i;
 		if (i % 8 == 0)
-			printk("\n" KERN_INFO PFX "0x%08x:  ", i);
+			printk("\n" KERN_INFO PFX "0x%08zx:  ", i);
 		if (msb_to_lsb) {
 			for (j = 7; j >= 0; j--) {
 				if (*d & (1 << j))
drivers/net/wireless/bcm43xx/bcm43xx_dma.c +7 -6
index c3681b8..bbecba0 100644
@@ -196,8 +196,9 @@ static int alloc_ringmemory(struct bcm43
 	}
 	if (ring->dmabase + BCM43xx_DMA_RINGMEMSIZE > BCM43xx_DMA_BUSADDRMAX) {
 		printk(KERN_ERR PFX ">>>FATAL ERROR<<<  DMA RINGMEMORY >1G "
-				    "(0x%08x, len: %lu)\n",
-		       ring->dmabase, BCM43xx_DMA_RINGMEMSIZE);
+				    "(0x%llx, len: %lu)\n",
+				(unsigned long long)ring->dmabase,
+				BCM43xx_DMA_RINGMEMSIZE);
 		dma_free_coherent(dev, BCM43xx_DMA_RINGMEMSIZE,
 				  ring->vbase, ring->dmabase);
 		return -ENOMEM;
@@ -307,8 +308,8 @@ static int setup_rx_descbuffer(struct bc
 		unmap_descbuffer(ring, dmaaddr, ring->rx_buffersize, 0);
 		dev_kfree_skb_any(skb);
 		printk(KERN_ERR PFX ">>>FATAL ERROR<<<  DMA RX SKB >1G "
-				    "(0x%08x, len: %u)\n",
-		       dmaaddr, ring->rx_buffersize);
+				    "(0x%llx, len: %u)\n",
+			(unsigned long long)dmaaddr, ring->rx_buffersize);
 		return -ENOMEM;
 	}
 	meta->skb = skb;
@@ -729,8 +730,8 @@ static int dma_tx_fragment(struct bcm43x
 	if (unlikely(meta->dmaaddr + skb->len > BCM43xx_DMA_BUSADDRMAX)) {
 		return_slot(ring, slot);
 		printk(KERN_ERR PFX ">>>FATAL ERROR<<<  DMA TX SKB >1G "
-				    "(0x%08x, len: %u)\n",
-		       meta->dmaaddr, skb->len);
+				    "(0x%llx, len: %u)\n",
+			(unsigned long long)meta->dmaaddr, skb->len);
 		return -ENOMEM;
 	}
 
drivers/net/wireless/bcm43xx/bcm43xx_main.c +2 -0
index c37371f..9a06e61 100644
@@ -52,6 +52,7 @@
 #include "bcm43xx_wx.h"
 #include "bcm43xx_ethtool.h"
 #include "bcm43xx_xmit.h"
+#include "bcm43xx_sysfs.h"
 
 
 MODULE_DESCRIPTION("Broadcom BCM43xx wireless driver");
@@ -3522,6 +3523,7 @@ static inline int bcm43xx_tx(struct bcm4
 		err = bcm43xx_pio_tx(bcm, txb);
 	else
 		err = bcm43xx_dma_tx(bcm, txb);
+	bcm->net_dev->trans_start = jiffies;
 
 	return err;
 }
drivers/net/wireless/bcm43xx/bcm43xx_phy.c +1 -0
index 0a66f43..3313716 100644
@@ -2151,6 +2151,7 @@ int bcm43xx_phy_init_tssi2dbm_table(stru
 				phy->tssi2dbm = NULL;
 				printk(KERN_ERR PFX "Could not generate "
 						    "tssi2dBm table\n");
+				kfree(dyn_tssi2dbm);
 				return -ENODEV;
 			}
 		phy->tssi2dbm = dyn_tssi2dbm;
drivers/net/wireless/bcm43xx/bcm43xx_power.c +68 -47

162 lines not on this page · raw message

drivers/net/wireless/bcm43xx/bcm43xx_power.h +9 -0
index 5f63640..c966ab3 100644
@@ -33,6 +33,15 @@
 
 #include <linux/types.h>
 
+/* Clock sources */
+enum {
+	/* PCI clock */
+	BCM43xx_PCTL_CLKSRC_PCI,
+	/* Crystal slow clock oscillator */
+	BCM43xx_PCTL_CLKSRC_XTALOS,
+	/* Low power oscillator */
+	BCM43xx_PCTL_CLKSRC_LOPWROS,
+};
 
 struct bcm43xx_private;
 
drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c +67 -48

217 lines not on this page · raw message

drivers/net/wireless/bcm43xx/bcm43xx_sysfs.h +0 -16
index 57f1451..cc701df 100644
@@ -1,22 +1,6 @@
 #ifndef BCM43xx_SYSFS_H_
 #define BCM43xx_SYSFS_H_
 
-#include <linux/device.h>
-
-
-struct bcm43xx_sysfs {
-	struct device_attribute attr_sprom;
-	struct device_attribute attr_interfmode;
-	struct device_attribute attr_preamble;
-};
-
-#define devattr_to_bcm(attr, attr_name)	({				\
-	struct bcm43xx_sysfs *__s; struct bcm43xx_private *__p;		\
-	__s = container_of((attr), struct bcm43xx_sysfs, attr_name);	\
-	__p = container_of(__s, struct bcm43xx_private, sysfs);		\
-	__p;								\
-					})
-
 struct bcm43xx_private;
 
 int bcm43xx_sysfs_register(struct bcm43xx_private *bcm);
drivers/net/wireless/bcm43xx/bcm43xx_wx.c +4 -4
index 3daee82..3edbb48 100644
@@ -962,22 +962,22 @@ static const struct iw_priv_args bcm43xx
 	{
 		.cmd		= PRIV_WX_SET_SHORTPREAMBLE,
 		.set_args	= IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
-		.name		= "set_shortpreambl",
+		.name		= "set_shortpreamb",
 	},
 	{
 		.cmd		= PRIV_WX_GET_SHORTPREAMBLE,
 		.get_args	= IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | MAX_WX_STRING,
-		.name		= "get_shortpreambl",
+		.name		= "get_shortpreamb",
 	},
 	{
 		.cmd		= PRIV_WX_SET_SWENCRYPTION,
 		.set_args	= IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
-		.name		= "set_swencryption",
+		.name		= "set_swencrypt",
 	},
 	{
 		.cmd		= PRIV_WX_GET_SWENCRYPTION,
 		.get_args	= IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | MAX_WX_STRING,
-		.name		= "get_swencryption",
+		.name		= "get_swencrypt",
 	},
 	{
 		.cmd		= PRIV_WX_SPROM_WRITE,
drivers/net/wireless/orinoco.c +1 -1
index 8dfdfbd..06523e2 100644
@@ -390,7 +390,7 @@ static struct iw_statistics *orinoco_get
 		}
 	} else {
 		struct {
-			__le16 qual, signal, noise;
+			__le16 qual, signal, noise, unused;
 		} __attribute__ ((packed)) cq;
 
 		err = HERMES_READ_RECORD(hw, USER_BAP,
include/net/ieee80211softmac.h +2 -1
index b971d8c..6b3693f 100644
@@ -267,8 +267,9 @@ extern void ieee80211softmac_stop(struct
 #define IEEE80211SOFTMAC_EVENT_AUTH_FAILED		5
 #define IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT		6
 #define IEEE80211SOFTMAC_EVENT_ASSOCIATE_NET_NOT_FOUND	7
+#define IEEE80211SOFTMAC_EVENT_DISASSOCIATED		8
 /* keep this updated! */
-#define IEEE80211SOFTMAC_EVENT_LAST			7
+#define IEEE80211SOFTMAC_EVENT_LAST			8
 /*
  * If you want to be notified of certain events, you can call
  * ieee80211softmac_notify[_atomic] with
net/core/dev.c +2 -1
index 83231a2..3bad1af 100644
@@ -2698,7 +2698,8 @@ int dev_ioctl(unsigned int cmd, void __u
 				/* If command is `set a parameter', or
 				 * `get the encoding parameters', check if
 				 * the user has the right to do it */
-				if (IW_IS_SET(cmd) || cmd == SIOCGIWENCODE) {
+				if (IW_IS_SET(cmd) || cmd == SIOCGIWENCODE
+				    || cmd == SIOCGIWENCODEEXT) {
 					if (!capable(CAP_NET_ADMIN))
 						return -EPERM;
 				}
net/core/wireless.c +8 -0
index 81d6995..d2bc72d 100644
@@ -1726,6 +1726,14 @@ int wireless_rtnetlink_get(struct net_de
 	if(!IW_IS_GET(request->cmd))
 		return -EOPNOTSUPP;
 
+	/* If command is `get the encoding parameters', check if
+	 * the user has the right to do it */
+	if (request->cmd == SIOCGIWENCODE ||
+	    request->cmd == SIOCGIWENCODEEXT) {
+		if (!capable(CAP_NET_ADMIN))
+			return -EPERM;
+	}
+
 	/* Special cases */
 	if(request->cmd == SIOCGIWSTATS)
 		/* Get Wireless Stats */
net/ieee80211/softmac/Kconfig +1 -0
index 6cd9f34..f2a27cc 100644
@@ -1,6 +1,7 @@
 config IEEE80211_SOFTMAC
 	tristate "Software MAC add-on to the IEEE 802.11 networking stack"
 	depends on IEEE80211 && EXPERIMENTAL
+	select WIRELESS_EXT
 	---help---
 	This option enables the hardware independent software MAC addon
 	for the IEEE 802.11 networking stack.
net/ieee80211/softmac/ieee80211softmac_assoc.c +4 -1
index be61de7..4498023 100644
@@ -101,6 +101,7 @@ ieee80211softmac_disassoc(struct ieee802
 	/* Do NOT clear bssvalid as that will break ieee80211softmac_assoc_work! */
 	mac->associated = 0;
 	mac->associnfo.associating = 0;
+	ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_DISASSOCIATED, NULL);
 	spin_unlock_irqrestore(&mac->lock, flags);
 }
 
@@ -373,6 +374,7 @@ ieee80211softmac_handle_disassoc(struct 
 	spin_lock_irqsave(&mac->lock, flags);
 	mac->associnfo.bssvalid = 0;
 	mac->associated = 0;
+	ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_DISASSOCIATED, NULL);
 	schedule_work(&mac->associnfo.work);
 	spin_unlock_irqrestore(&mac->lock, flags);
 	
@@ -391,6 +393,7 @@ ieee80211softmac_handle_reassoc_req(stru
 		dprintkl(KERN_INFO PFX "reassoc request from unknown network\n");
 		return 0;
 	}
-	ieee80211softmac_assoc(mac, network);
+	schedule_work(&mac->associnfo.work);
+
 	return 0;
 }
net/ieee80211/softmac/ieee80211softmac_event.c +35 -5
index 0a52bbd..8cc8f3f 100644
@@ -67,6 +67,7 @@ static char *event_descriptions[IEEE8021
 	"authenticating failed",
 	"authenticating timed out",
 	"associating failed because no suitable network was found",
+	"disassociated",
 };
 
 
@@ -128,13 +129,42 @@ void
 ieee80211softmac_call_events_locked(struct ieee80211softmac_device *mac, int event, void *event_ctx)
 {
 	struct ieee80211softmac_event *eventptr, *tmp;
-	union iwreq_data wrqu;
-	char *msg;
+	struct ieee80211softmac_network *network;
 	
 	if (event >= 0) {
-		msg = event_descriptions[event];
-		wrqu.data.length = strlen(msg);
-		wireless_send_event(mac->dev, IWEVCUSTOM, &wrqu, msg);
+		union iwreq_data wrqu;
+		int we_event;
+		char *msg = NULL;
+
+		switch(event) {
+		case IEEE80211SOFTMAC_EVENT_ASSOCIATED:
+			network = (struct ieee80211softmac_network *)event_ctx;
+			wrqu.data.length = 0;
+			wrqu.data.flags = 0;
+			memcpy(wrqu.ap_addr.sa_data, &network->bssid[0], ETH_ALEN);
+			wrqu.ap_addr.sa_family = ARPHRD_ETHER;
+			we_event = SIOCGIWAP;
+			break;
+		case IEEE80211SOFTMAC_EVENT_DISASSOCIATED:
+			wrqu.data.length = 0;
+			wrqu.data.flags = 0;
+			memset(&wrqu, '\0', sizeof (union iwreq_data));
+			wrqu.ap_addr.sa_family = ARPHRD_ETHER;
+			we_event = SIOCGIWAP;
+			break;
+		case IEEE80211SOFTMAC_EVENT_SCAN_FINISHED:
+			wrqu.data.length = 0;
+			wrqu.data.flags = 0;
+			memset(&wrqu, '\0', sizeof (union iwreq_data));
+			we_event = SIOCGIWSCAN;
+			break;
+		default:
+			msg = event_descriptions[event];
+			wrqu.data.length = strlen(msg);
+			we_event = IWEVCUSTOM;
+			break;
+		}
+		wireless_send_event(mac->dev, we_event, &wrqu, msg);
 	}
 
 	if (!list_empty(&mac->events))
net/ieee80211/softmac/ieee80211softmac_io.c +15 -3
index febc51d..cc6cd56 100644
@@ -180,9 +180,21 @@ ieee80211softmac_assoc_req(struct ieee80
 	ieee80211softmac_hdr_3addr(mac, &((*pkt)->header), IEEE80211_STYPE_ASSOC_REQ, net->bssid, net->bssid);
 
 	/* Fill in capability Info */
-	(*pkt)->capability = (mac->ieee->iw_mode == IW_MODE_MASTER) || (mac->ieee->iw_mode == IW_MODE_INFRA) ?
-		cpu_to_le16(WLAN_CAPABILITY_ESS) :
-		cpu_to_le16(WLAN_CAPABILITY_IBSS);
+	switch (mac->ieee->iw_mode) {
+	case IW_MODE_INFRA:
+		(*pkt)->capability = cpu_to_le16(WLAN_CAPABILITY_ESS);
+		break;
+	case IW_MODE_ADHOC:
+		(*pkt)->capability = cpu_to_le16(WLAN_CAPABILITY_IBSS);
+		break;
+	case IW_MODE_AUTO:
+		(*pkt)->capability = net->capabilities & (WLAN_CAPABILITY_ESS|WLAN_CAPABILITY_IBSS);
+		break;
+	default:
+		/* bleh. we don't ever go to these modes */
+		printk(KERN_ERR PFX "invalid iw_mode!\n");
+		break;
+	}
 	/* Need to add this
 	(*pkt)->capability |= mac->ieee->short_slot ? 
 			cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME) : 0;
net/ieee80211/softmac/ieee80211softmac_scan.c +2 -0
index bb9ab8b..2b9e7ed 100644
@@ -47,6 +47,7 @@ ieee80211softmac_start_scan(struct ieee8
 	sm->scanning = 1;
 	spin_unlock_irqrestore(&sm->lock, flags);
 
+	netif_tx_disable(sm->ieee->dev);
 	ret = sm->start_scan(sm->dev);
 	if (ret) {
 		spin_lock_irqsave(&sm->lock, flags);
@@ -239,6 +240,7 @@ void ieee80211softmac_scan_finished(stru
 		if (net)
 			sm->set_channel(sm->dev, net->channel);
 	}
+	netif_wake_queue(sm->ieee->dev);
 	ieee80211softmac_call_events(sm, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, NULL);
 }
 EXPORT_SYMBOL_GPL(ieee80211softmac_scan_finished);
net/ieee80211/softmac/ieee80211softmac_wx.c +10 -0
index b559aa9..00f0d4f 100644
@@ -41,13 +41,23 @@ ieee80211softmac_wx_trigger_scan(struct 
 EXPORT_SYMBOL_GPL(ieee80211softmac_wx_trigger_scan);
 
 
+/* if we're still scanning, return -EAGAIN so that userspace tools
+ * can get the complete scan results, otherwise return 0. */
 int
 ieee80211softmac_wx_get_scan_results(struct net_device *net_dev,
 				     struct iw_request_info *info,
 				     union iwreq_data *data,
 				     char *extra)
 {
+	unsigned long flags;
 	struct ieee80211softmac_device *sm = ieee80211_priv(net_dev);
+
+	spin_lock_irqsave(&sm->lock, flags);
+	if (sm->scanning) {
+		spin_unlock_irqrestore(&sm->lock, flags);
+		return -EAGAIN;
+	}
+	spin_unlock_irqrestore(&sm->lock, flags);
 	return ieee80211_wx_get_scan(sm->ieee, info, data, extra);
 }
 EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_scan_results);
Signature · 2 lines
John W. Linville
[email protected]
#1 lore raw
Quoted 3 lines · John W. Linville

bcm43xx: fix dyn tssi2dbm memleak
bcm43xx: fix pctl slowclock limit calculation
bcm43xx: sysfs code cleanup

These are already in -mm and on their way into linus's tree. Is it possible to cause problems?
If not, fine. If yes, we need some clearly defined rules where to put patches and a clearly defined statement of how often patches are pushed upstream.

Signature · 1 line
Greetings Michael.
#2 lore raw
Quoted 7 lines · Michael Buesch
Quoted 3 lines · John W. Linville

bcm43xx: fix dyn tssi2dbm memleak
bcm43xx: fix pctl slowclock limit calculation
bcm43xx: sysfs code cleanup

These are already in -mm and on their way into linus's tree.

I don't send netdev patches to Linus except under unusual circumstances. I'd expect these patches to go upstream via John or Jeff.

Quoted 1 line

Is it possible to cause problems?

Nope, I'll just drop then when they appear in a git tree.

And I really need to find a way of getting git-wireless into -mm. Problem is, it's based off git-netdev-all and when John's tree is synced to a later version of Linus's tree than Jeff's tree, all hell breaks loose at my end. Junio and I weren't able to work out a way of extracting the jeff->john diffs so I gave up.

Probably, I'll need to actually do a git merge, generate the diff then throw away the resulting git tree. Or something. I've avoided doing git merges because I'm dealing with 58 trees and I suspect I'd go insane.

Quoted 3 lines

If not, fine. If yes, we need some clearly defined rules where to put patches and a clearly defined statement of how often patches are pushed upstream.

Because I don't carry git-wireless I don't have visibility of when John has merged something. Ordinarily you'd have seen me drop the patches again when they popped up in John's tree.

#3 lore raw
Quoted 26 lines · you
Quoted 7 lines · Michael Buesch
Quoted 3 lines · John W. Linville

bcm43xx: fix dyn tssi2dbm memleak
bcm43xx: fix pctl slowclock limit calculation
bcm43xx: sysfs code cleanup

These are already in -mm and on their way into linus's tree.

I don't send netdev patches to Linus except under unusual circumstances. I'd expect these patches to go upstream via John or Jeff.

Quoted 1 line

Is it possible to cause problems?

Nope, I'll just drop then when they appear in a git tree.

And I really need to find a way of getting git-wireless into -mm. Problem is, it's based off git-netdev-all and when John's tree is synced to a later version of Linus's tree than Jeff's tree, all hell breaks loose at my end. Junio and I weren't able to work out a way of extracting the jeff->john diffs so I gave up.

Probably, I'll need to actually do a git merge, generate the diff then throw away the resulting git tree. Or something. I've avoided doing git merges because I'm dealing with 58 trees and I suspect I'd go insane.

Quoted 7 lines
Quoted 3 lines

If not, fine. If yes, we need some clearly defined rules where to put patches and a clearly defined statement of how often patches are pushed upstream.

Because I don't carry git-wireless I don't have visibility of when John has merged something. Ordinarily you'd have seen me drop the patches again when they popped up in John's tree.

Ok, that is perfectly fine and it will work.
Thanks for the clarification.

Signature · 1 line
Greetings Michael.
#4 lore raw
In reply to Andrew Morton
Quoted 3 lines · Andrew Morton

And I really need to find a way of getting git-wireless into -mm. Problem is, it's based off git-netdev-all and when John's tree is synced to a later version of Linus's tree than Jeff's tree, all hell breaks loose at my end.

FWIW, I think this issue should be gone (hopefully never to return). For a while I was pulling from Jeff's netdev tree as a way to fix-up a git administration error I had inflicted upon myself... That need has disappeared since 2.6.17 opened and Jeff pushed his upstream branch to Linus.

At present, all the branches in wireless-2.6 only pull from linux-2.6. I am still pushing (i.e. requesting Jeff's pull) to netdev-2.6, if that matters.

Maybe the current wireless-2.6 tree fits into your system better?

Thanks,

John

Signature · 2 lines
John W. Linville
[email protected]
#5 lore raw
Quoted 6 lines · John W. Linville

At present, all the branches in wireless-2.6 only pull from linux-2.6.
I am still pushing (i.e. requesting Jeff's pull) to netdev-2.6, if that matters.

Maybe the current wireless-2.6 tree fits into your system better?

Works well, thanks. I have some patches for you ;)

#6 lore raw
Quoted 9 lines · Andrew Morton
Quoted 6 lines · John W. Linville

At present, all the branches in wireless-2.6 only pull from linux-2.6.
I am still pushing (i.e. requesting Jeff's pull) to netdev-2.6, if that matters.

Maybe the current wireless-2.6 tree fits into your system better?

Works well, thanks. I have some patches for you ;)

Well, since Jeff pushed it on to me, if you have patches that fix obvious problems and should go in before 2.6.17, you can now push those directly to me too ;)

Linus

#7 lore raw
In reply to Michael Buesch
Quoted 10 lines · Michael Buesch
Quoted 3 lines · John W. Linville

bcm43xx: fix dyn tssi2dbm memleak
bcm43xx: fix pctl slowclock limit calculation
bcm43xx: sysfs code cleanup

These are already in -mm and on their way into linus's tree. Is it possible to cause problems?
If not, fine. If yes, we need some clearly defined rules where to put patches and a clearly defined statement of how often patches are pushed upstream.

Ideally, patches should be sent to John, who will send me -> Linus. If they are bug fixes, the turnaround can be same once I get them from John (and Linus is taking patches).

That's always been the standard route: wireless patches -> wireless maintainer.

Jeff

#8 lore raw
In reply to John W. Linville
Quoted 7 lines · John W. Linville

The following changes since commit 0efd9323f32c137b5cf48bc6582cd08556e7cdfc:
Linus Torvalds:
Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block

are found in the git repository at:

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

pulled