Skip to contentSkip to conversation

pull request: wireless-2.6 2008-02-27

PATCH John W. Linville 12 participants 26 messages Feb 28, 2008 – Mar 23, 2008 12 messages not in the archive

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

Dave,

Here are some fixes intended for 2.6.25. Please let me know if there are problems!

Thanks,

John

P.S. This will create a merge conflict with the code I already requested that you pull for net-2.6.26. The merge is easily resolved, since it is two "comment block + single statement" additions at the same place in the file. Just take both sets of changes, and order the "Evalue antenna setup" group _after_ the "Send a signal to the led" group. I have the conflict corrected in my wireless-testing tree for reference if you need it.

---

Individual patches are available here:

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

---

The following changes since commit d9595a7b9c777d45a74774f1428c263a0a47f4c0:
David S. Miller (1):
[AF_KEY]: Fix oops by converting to proc_net_*().

are available in the git repository at:

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

Alexey Zaytsev (2):
Use a separate config option for the b43 pci to ssb bridge. Don't build bcm43xx if SSB is static and b43 PCI-SSB bridge is enabled.

Gordon Farquharson (1):
Fix b43 driver build for arm

Ivo van Doorn (4):
rt2x00: Fix antenna diversity
rt2x00: Add link tuner safe RX toggle states
rt2x00: Don't switch to antenna with low rssi
rt2x00: Fix rt2x00lib_reset_link_tuner()

Johannes Berg (2):
rndis_wlan: fix sparse warnings
mac80211: fix kmalloc vs. net_ratelimit

Masakazu Mokuno (1):
PS3: gelic: Link the wireless net_device structure to the corresponding device structure

Roland Dreier (1):
libertas: Remove unused exports

Sebastian Siewior (1):
gelic wireless driver needs WIRELESS_EXT support

 drivers/net/Kconfig                        |    1 +
 drivers/net/ps3_gelic_wireless.c           |    1 +
 drivers/net/wireless/b43/Kconfig           |    1 +
 drivers/net/wireless/b43legacy/Kconfig     |    1 +
 drivers/net/wireless/bcm43xx/Kconfig       |    2 +-
 drivers/net/wireless/libertas/cmd.c        |    2 -
 drivers/net/wireless/libertas/decl.h       |    1 -
 drivers/net/wireless/libertas/main.c       |   17 -------
 drivers/net/wireless/rndis_wlan.c          |   14 +++---
 drivers/net/wireless/rt2x00/rt2400pci.c    |    6 ++-
 drivers/net/wireless/rt2x00/rt2500pci.c    |    6 ++-
 drivers/net/wireless/rt2x00/rt2500usb.c    |    6 ++-
 drivers/net/wireless/rt2x00/rt2x00config.c |    8 ++-
 drivers/net/wireless/rt2x00/rt2x00dev.c    |   73 ++++++++++++++-------------
 drivers/net/wireless/rt2x00/rt2x00reg.h    |    2 +
 drivers/net/wireless/rt2x00/rt61pci.c      |    6 ++-
 drivers/net/wireless/rt2x00/rt73usb.c      |    6 ++-
 drivers/ssb/Kconfig                        |    5 ++
 drivers/ssb/Makefile                       |    2 +-
 drivers/ssb/ssb_private.h                  |    4 +-
 include/linux/mod_devicetable.h            |    8 +++-
 net/mac80211/ieee80211_sta.c               |    7 ++-
 22 files changed, 102 insertions(+), 77 deletions(-)
drivers/net/Kconfig +1 -0
index a20e72f..a0f0e60 100644
@@ -2368,6 +2368,7 @@ config GELIC_NET
 config GELIC_WIRELESS
        bool "PS3 Wireless support"
        depends on GELIC_NET
+       select WIRELESS_EXT
        help
         This option adds the support for the wireless feature of PS3.
         If you have the wireless-less model of PS3 or have no plan to
drivers/net/ps3_gelic_wireless.c +1 -0
index 750d2a9..daf5aba 100644
@@ -2690,6 +2690,7 @@ int gelic_wl_driver_probe(struct gelic_card *card)
 		return -ENOMEM;
 
 	/* setup net_device structure */
+	SET_NETDEV_DEV(netdev, &card->dev->core);
 	gelic_wl_setup_netdev_ops(netdev);
 
 	/* setup some of net_device and register it */
drivers/net/wireless/b43/Kconfig +1 -0
index 1a2141d..8bc4bc4 100644
@@ -32,6 +32,7 @@ config B43_PCI_AUTOSELECT
 	bool
 	depends on B43 && SSB_PCIHOST_POSSIBLE
 	select SSB_PCIHOST
+	select SSB_B43_PCI_BRIDGE
 	default y
 
 # Auto-select SSB PCICORE driver, if possible
drivers/net/wireless/b43legacy/Kconfig +1 -0
index 6745579..13c65fa 100644
@@ -25,6 +25,7 @@ config B43LEGACY_PCI_AUTOSELECT
 	bool
 	depends on B43LEGACY && SSB_PCIHOST_POSSIBLE
 	select SSB_PCIHOST
+	select SSB_B43_PCI_BRIDGE
 	default y
 
 # Auto-select SSB PCICORE driver, if possible
drivers/net/wireless/bcm43xx/Kconfig +1 -1
index 0159701..afb8f43 100644
@@ -1,6 +1,6 @@
 config BCM43XX
 	tristate "Broadcom BCM43xx wireless support (DEPRECATED)"
-	depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && WLAN_80211 && EXPERIMENTAL
+	depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && WLAN_80211 && (!SSB_B43_PCI_BRIDGE || SSB != y) && EXPERIMENTAL
 	select WIRELESS_EXT
 	select FW_LOADER
 	select HW_RANDOM
drivers/net/wireless/libertas/cmd.c +0 -2
index eab0203..b3c1acb 100644
@@ -1040,7 +1040,6 @@ int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action,
 	lbs_deb_leave(LBS_DEB_CMD);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_mesh_access);
 
 int lbs_mesh_config(struct lbs_private *priv, uint16_t enable, uint16_t chan)
 {
@@ -1576,7 +1575,6 @@ done:
 	lbs_deb_leave_args(LBS_DEB_HOST, "ret %d", ret);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command);
 
 /**
  *  @brief This function allocates the command buffer and link
drivers/net/wireless/libertas/decl.h +0 -1
index aaacd9b..4e22341 100644
@@ -69,7 +69,6 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev);
 int lbs_remove_card(struct lbs_private *priv);
 int lbs_start_card(struct lbs_private *priv);
 int lbs_stop_card(struct lbs_private *priv);
-int lbs_reset_device(struct lbs_private *priv);
 void lbs_host_to_card_done(struct lbs_private *priv);
 
 int lbs_update_channel(struct lbs_private *priv);
drivers/net/wireless/libertas/main.c +0 -17
index 84fb49c..4d4e2f3 100644
@@ -1351,8 +1351,6 @@ done:
 	lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_add_mesh);
-
 
 static void lbs_remove_mesh(struct lbs_private *priv)
 {
@@ -1372,7 +1370,6 @@ static void lbs_remove_mesh(struct lbs_private *priv)
 	free_netdev(mesh_dev);
 	lbs_deb_leave(LBS_DEB_MESH);
 }
-EXPORT_SYMBOL_GPL(lbs_remove_mesh);
 
 /**
  *  @brief This function finds the CFP in
@@ -1458,20 +1455,6 @@ void lbs_interrupt(struct lbs_private *priv)
 }
 EXPORT_SYMBOL_GPL(lbs_interrupt);
 
-int lbs_reset_device(struct lbs_private *priv)
-{
-	int ret;
-
-	lbs_deb_enter(LBS_DEB_MAIN);
-	ret = lbs_prepare_and_send_command(priv, CMD_802_11_RESET,
-				    CMD_ACT_HALT, 0, 0, NULL);
-	msleep_interruptible(10);
-
-	lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
-	return ret;
-}
-EXPORT_SYMBOL_GPL(lbs_reset_device);
-
 static int __init lbs_init_module(void)
 {
 	lbs_deb_enter(LBS_DEB_MAIN);
drivers/net/wireless/rndis_wlan.c +7 -7
index 8ce2ddf..d9460ae 100644
@@ -228,9 +228,9 @@ struct NDIS_WLAN_BSSID_EX {
 	struct NDIS_802_11_SSID Ssid;
 	__le32 Privacy;
 	__le32 Rssi;
-	enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
+	__le32 NetworkTypeInUse;
 	struct NDIS_802_11_CONFIGURATION Configuration;
-	enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
+	__le32 InfrastructureMode;
 	u8 SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
 	__le32 IELength;
 	u8 IEs[0];
@@ -279,11 +279,11 @@ struct RNDIS_CONFIG_PARAMETER_INFOBUFFER {
 } __attribute__((packed));
 
 /* these have to match what is in wpa_supplicant */
-enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg;
-enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, CIPHER_WEP104 }
-	wpa_cipher;
-enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE, KEY_MGMT_802_1X_NO_WPA,
-	KEY_MGMT_WPA_NONE } wpa_key_mgmt;
+enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP };
+enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
+		  CIPHER_WEP104 };
+enum wpa_key_mgmt { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE,
+		    KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE };
 
 /*
  *  private data
drivers/net/wireless/rt2x00/rt2400pci.c +5 -1
index d6cba13..c69f85e 100644
@@ -960,8 +960,12 @@ static int rt2400pci_set_device_state(struct rt2x00_dev *rt2x00dev,
 		rt2400pci_disable_radio(rt2x00dev);
 		break;
 	case STATE_RADIO_RX_ON:
+	case STATE_RADIO_RX_ON_LINK:
+		rt2400pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		break;
 	case STATE_RADIO_RX_OFF:
-		rt2400pci_toggle_rx(rt2x00dev, state);
+	case STATE_RADIO_RX_OFF_LINK:
+		rt2400pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
 		break;
 	case STATE_DEEP_SLEEP:
 	case STATE_SLEEP:
drivers/net/wireless/rt2x00/rt2500pci.c +5 -1
index e874fdc..91e87b5 100644
@@ -1112,8 +1112,12 @@ static int rt2500pci_set_device_state(struct rt2x00_dev *rt2x00dev,
 		rt2500pci_disable_radio(rt2x00dev);
 		break;
 	case STATE_RADIO_RX_ON:
+	case STATE_RADIO_RX_ON_LINK:
+		rt2500pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		break;
 	case STATE_RADIO_RX_OFF:
-		rt2500pci_toggle_rx(rt2x00dev, state);
+	case STATE_RADIO_RX_OFF_LINK:
+		rt2500pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
 		break;
 	case STATE_DEEP_SLEEP:
 	case STATE_SLEEP:
drivers/net/wireless/rt2x00/rt2500usb.c +5 -1
index 4ca9730..638c3d2 100644
@@ -1001,8 +1001,12 @@ static int rt2500usb_set_device_state(struct rt2x00_dev *rt2x00dev,
 		rt2500usb_disable_radio(rt2x00dev);
 		break;
 	case STATE_RADIO_RX_ON:
+	case STATE_RADIO_RX_ON_LINK:
+		rt2500usb_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		break;
 	case STATE_RADIO_RX_OFF:
-		rt2500usb_toggle_rx(rt2x00dev, state);
+	case STATE_RADIO_RX_OFF_LINK:
+		rt2500usb_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
 		break;
 	case STATE_DEEP_SLEEP:
 	case STATE_SLEEP:
drivers/net/wireless/rt2x00/rt2x00config.c +6 -2
index 72cfe00..07adc57 100644
@@ -97,12 +97,16 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
 	libconf.ant.rx = rx;
 	libconf.ant.tx = tx;
 
+	if (rx == rt2x00dev->link.ant.active.rx &&
+	    tx == rt2x00dev->link.ant.active.tx)
+		return;
+
 	/*
 	 * Antenna setup changes require the RX to be disabled,
 	 * else the changes will be ignored by the device.
 	 */
 	if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
-		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
+		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF_LINK);
 
 	/*
 	 * Write new antenna setup to device and reset the link tuner.
@@ -116,7 +120,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
 	rt2x00dev->link.ant.active.tx = libconf.ant.tx;
 
 	if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
-		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON_LINK);
 }
 
 void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
drivers/net/wireless/rt2x00/rt2x00dev.c +38 -35

132 lines not on this page · raw message

drivers/net/wireless/rt2x00/rt2x00reg.h +2 -0
index 8384212..b1915dc 100644
@@ -85,6 +85,8 @@ enum dev_state {
 	STATE_RADIO_OFF,
 	STATE_RADIO_RX_ON,
 	STATE_RADIO_RX_OFF,
+	STATE_RADIO_RX_ON_LINK,
+	STATE_RADIO_RX_OFF_LINK,
 	STATE_RADIO_IRQ_ON,
 	STATE_RADIO_IRQ_OFF,
 };
drivers/net/wireless/rt2x00/rt61pci.c +5 -1
index b31f0c2..e808db9 100644
@@ -1482,8 +1482,12 @@ static int rt61pci_set_device_state(struct rt2x00_dev *rt2x00dev,
 		rt61pci_disable_radio(rt2x00dev);
 		break;
 	case STATE_RADIO_RX_ON:
+	case STATE_RADIO_RX_ON_LINK:
+		rt61pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		break;
 	case STATE_RADIO_RX_OFF:
-		rt61pci_toggle_rx(rt2x00dev, state);
+	case STATE_RADIO_RX_OFF_LINK:
+		rt61pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
 		break;
 	case STATE_DEEP_SLEEP:
 	case STATE_SLEEP:
drivers/net/wireless/rt2x00/rt73usb.c +5 -1
index 4d576ab..4fac2d4 100644
@@ -1208,8 +1208,12 @@ static int rt73usb_set_device_state(struct rt2x00_dev *rt2x00dev,
 		rt73usb_disable_radio(rt2x00dev);
 		break;
 	case STATE_RADIO_RX_ON:
+	case STATE_RADIO_RX_ON_LINK:
+		rt73usb_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		break;
 	case STATE_RADIO_RX_OFF:
-		rt73usb_toggle_rx(rt2x00dev, state);
+	case STATE_RADIO_RX_OFF_LINK:
+		rt73usb_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
 		break;
 	case STATE_DEEP_SLEEP:
 	case STATE_SLEEP:
drivers/ssb/Kconfig +5 -0
index 78fd331..adea792 100644
@@ -35,6 +35,11 @@ config SSB_PCIHOST
 
 	  If unsure, say Y
 
+config SSB_B43_PCI_BRIDGE
+	bool
+	depends on SSB_PCIHOST
+	default n
+
 config SSB_PCMCIAHOST_POSSIBLE
 	bool
 	depends on SSB && (PCMCIA = y || PCMCIA = SSB) && EXPERIMENTAL
drivers/ssb/Makefile +1 -1
index e235144..de94c2e 100644
@@ -14,6 +14,6 @@ ssb-$(CONFIG_SSB_DRIVER_PCICORE)	+= driver_pcicore.o
 
 # b43 pci-ssb-bridge driver
 # Not strictly a part of SSB, but kept here for convenience
-ssb-$(CONFIG_SSB_PCIHOST)		+= b43_pci_bridge.o
+ssb-$(CONFIG_SSB_B43_PCI_BRIDGE)	+= b43_pci_bridge.o
 
 obj-$(CONFIG_SSB)			+= ssb.o
drivers/ssb/ssb_private.h +2 -2
index a789364..21eca2b 100644
@@ -120,10 +120,10 @@ extern int ssb_devices_thaw(struct ssb_bus *bus);
 extern struct ssb_bus *ssb_pci_dev_to_bus(struct pci_dev *pdev);
 
 /* b43_pci_bridge.c */
-#ifdef CONFIG_SSB_PCIHOST
+#ifdef CONFIG_SSB_B43_PCI_BRIDGE
 extern int __init b43_pci_ssb_bridge_init(void);
 extern void __exit b43_pci_ssb_bridge_exit(void);
-#else /* CONFIG_SSB_PCIHOST */
+#else /* CONFIG_SSB_B43_PCI_BRIDGR */
 static inline int b43_pci_ssb_bridge_init(void)
 {
 	return 0;
include/linux/mod_devicetable.h +7 -1
index 139d49d..fd217ae 100644
@@ -351,7 +351,13 @@ struct sdio_device_id {
 struct ssb_device_id {
 	__u16	vendor;
 	__u16	coreid;
-	__u8	revision;
+	/* Explicit padding to support a broken sanity check in file2alias.c.
+	 * The check compares the size of the structure in the kernel
+	 * object file to the size of the structure reported in userspace for
+	 * the system on which the kernel is compiled. The check breaks on
+	 * cross-compilation, and the padding is a workaround for this. */
+	__u8	revision
+		__attribute__((aligned(sizeof(__u32))));
 };
 #define SSB_DEVICE(_vendor, _coreid, _revision)  \
 	{ .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
net/mac80211/ieee80211_sta.c +4 -3
index 2019b4f..9aeed53 100644
@@ -1116,9 +1116,10 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,
 	/* prepare reordering buffer */
 	tid_agg_rx->reorder_buf =
 		kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC);
-	if ((!tid_agg_rx->reorder_buf) && net_ratelimit()) {
-		printk(KERN_ERR "can not allocate reordering buffer "
-						"to tid %d\n", tid);
+	if (!tid_agg_rx->reorder_buf) {
+		if (net_ratelimit())
+			printk(KERN_ERR "can not allocate reordering buffer "
+			       "to tid %d\n", tid);
 		goto end;
 	}
 	memset(tid_agg_rx->reorder_buf, 0,
Signature · 2 lines
John W. Linville
[email protected]
maintainer
#1 lore raw

From: "John W. Linville" <[email protected]>
Date: Wed, 27 Feb 2008 20:41:25 -0500

Quoted 2 lines

Gordon Farquharson (1):
Fix b43 driver build for arm

Please revert this change and resend your pull request.

If file2alias doesn't work properly in a cross build environment, we don't fix it by crapping up mod_devalias.h with these silly align attribute annotations.

Thanks.

A message that is not in the archive (sent off-list or not yet received): 20080227.235110.242439399.davem-fT/PcQaiUtIeIZ0/[email protected]

#3 lore raw

pull request: wireless-2.6 2008-02-28

Quoted 11 lines · David Miller

From: "John W. Linville" <[email protected]>
Date: Wed, 27 Feb 2008 20:41:25 -0500

Quoted 2 lines

Gordon Farquharson (1):
Fix b43 driver build for arm

Please revert this change and resend your pull request.

If file2alias doesn't work properly in a cross build environment, we don't fix it by crapping up mod_devalias.h with these silly align attribute annotations.

As you wish... :-)

---

This version drops the "Fix b43 drivers build for arm" patch, and adds a one-line build fix for SSB-attached PCI cores (found on bcm47xx mips).

Dave,

Here are some fixes intended for 2.6.25. Please let me know if there are problems!

Thanks,

John

P.S. This will create a merge conflict with the code I already requested that you pull for net-2.6.26. The merge is easily resolved, since it is two "comment block + single statement" additions at the same place in the file. Just take both sets of changes, and order the "Evalue antenna setup" group _after_ the "Send a signal to the led" group. I have the conflict corrected in my wireless-testing tree for reference if you need it.

---

Individual patches are available here:

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

---

The following changes since commit d9595a7b9c777d45a74774f1428c263a0a47f4c0:
David S. Miller (1):
[AF_KEY]: Fix oops by converting to proc_net_*().

are available in the git repository at:

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

Alexey Zaytsev (2):
Use a separate config option for the b43 pci to ssb bridge. Don't build bcm43xx if SSB is static and b43 PCI-SSB bridge is enabled.

Aurelien Jarno (1):
SSB PCI core driver: use new SPROM data structure

Ivo van Doorn (4):
rt2x00: Fix antenna diversity
rt2x00: Add link tuner safe RX toggle states
rt2x00: Don't switch to antenna with low rssi
rt2x00: Fix rt2x00lib_reset_link_tuner()

Johannes Berg (2):
rndis_wlan: fix sparse warnings
mac80211: fix kmalloc vs. net_ratelimit

Masakazu Mokuno (1):
PS3: gelic: Link the wireless net_device structure to the corresponding device structure

Roland Dreier (1):
libertas: Remove unused exports

Sebastian Siewior (1):
gelic wireless driver needs WIRELESS_EXT support

 drivers/net/Kconfig                        |    1 +
 drivers/net/ps3_gelic_wireless.c           |    1 +
 drivers/net/wireless/b43/Kconfig           |    1 +
 drivers/net/wireless/b43legacy/Kconfig     |    1 +
 drivers/net/wireless/bcm43xx/Kconfig       |    2 +-
 drivers/net/wireless/libertas/cmd.c        |    2 -
 drivers/net/wireless/libertas/decl.h       |    1 -
 drivers/net/wireless/libertas/main.c       |   17 -------
 drivers/net/wireless/rndis_wlan.c          |   14 +++---
 drivers/net/wireless/rt2x00/rt2400pci.c    |    6 ++-
 drivers/net/wireless/rt2x00/rt2500pci.c    |    6 ++-
 drivers/net/wireless/rt2x00/rt2500usb.c    |    6 ++-
 drivers/net/wireless/rt2x00/rt2x00config.c |    8 ++-
 drivers/net/wireless/rt2x00/rt2x00dev.c    |   73 ++++++++++++++-------------
 drivers/net/wireless/rt2x00/rt2x00reg.h    |    2 +
 drivers/net/wireless/rt2x00/rt61pci.c      |    6 ++-
 drivers/net/wireless/rt2x00/rt73usb.c      |    6 ++-
 drivers/ssb/Kconfig                        |    5 ++
 drivers/ssb/Makefile                       |    2 +-
 drivers/ssb/driver_pcicore.c               |    2 +-
 drivers/ssb/ssb_private.h                  |    4 +-
 net/mac80211/ieee80211_sta.c               |    7 ++-
 22 files changed, 96 insertions(+), 77 deletions(-)
drivers/net/Kconfig +1 -0
index a20e72f..a0f0e60 100644
@@ -2368,6 +2368,7 @@ config GELIC_NET
 config GELIC_WIRELESS
        bool "PS3 Wireless support"
        depends on GELIC_NET
+       select WIRELESS_EXT
        help
         This option adds the support for the wireless feature of PS3.
         If you have the wireless-less model of PS3 or have no plan to
drivers/net/ps3_gelic_wireless.c +1 -0
index 750d2a9..daf5aba 100644
@@ -2690,6 +2690,7 @@ int gelic_wl_driver_probe(struct gelic_card *card)
 		return -ENOMEM;
 
 	/* setup net_device structure */
+	SET_NETDEV_DEV(netdev, &card->dev->core);
 	gelic_wl_setup_netdev_ops(netdev);
 
 	/* setup some of net_device and register it */
drivers/net/wireless/b43/Kconfig +1 -0
index 1a2141d..8bc4bc4 100644
@@ -32,6 +32,7 @@ config B43_PCI_AUTOSELECT
 	bool
 	depends on B43 && SSB_PCIHOST_POSSIBLE
 	select SSB_PCIHOST
+	select SSB_B43_PCI_BRIDGE
 	default y
 
 # Auto-select SSB PCICORE driver, if possible
drivers/net/wireless/b43legacy/Kconfig +1 -0
index 6745579..13c65fa 100644
@@ -25,6 +25,7 @@ config B43LEGACY_PCI_AUTOSELECT
 	bool
 	depends on B43LEGACY && SSB_PCIHOST_POSSIBLE
 	select SSB_PCIHOST
+	select SSB_B43_PCI_BRIDGE
 	default y
 
 # Auto-select SSB PCICORE driver, if possible
drivers/net/wireless/bcm43xx/Kconfig +1 -1
index 0159701..afb8f43 100644
@@ -1,6 +1,6 @@
 config BCM43XX
 	tristate "Broadcom BCM43xx wireless support (DEPRECATED)"
-	depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && WLAN_80211 && EXPERIMENTAL
+	depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && WLAN_80211 && (!SSB_B43_PCI_BRIDGE || SSB != y) && EXPERIMENTAL
 	select WIRELESS_EXT
 	select FW_LOADER
 	select HW_RANDOM
drivers/net/wireless/libertas/cmd.c +0 -2
index eab0203..b3c1acb 100644
@@ -1040,7 +1040,6 @@ int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action,
 	lbs_deb_leave(LBS_DEB_CMD);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_mesh_access);
 
 int lbs_mesh_config(struct lbs_private *priv, uint16_t enable, uint16_t chan)
 {
@@ -1576,7 +1575,6 @@ done:
 	lbs_deb_leave_args(LBS_DEB_HOST, "ret %d", ret);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command);
 
 /**
  *  @brief This function allocates the command buffer and link
drivers/net/wireless/libertas/decl.h +0 -1
index aaacd9b..4e22341 100644
@@ -69,7 +69,6 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev);
 int lbs_remove_card(struct lbs_private *priv);
 int lbs_start_card(struct lbs_private *priv);
 int lbs_stop_card(struct lbs_private *priv);
-int lbs_reset_device(struct lbs_private *priv);
 void lbs_host_to_card_done(struct lbs_private *priv);
 
 int lbs_update_channel(struct lbs_private *priv);
drivers/net/wireless/libertas/main.c +0 -17
index 84fb49c..4d4e2f3 100644
@@ -1351,8 +1351,6 @@ done:
 	lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_add_mesh);
-
 
 static void lbs_remove_mesh(struct lbs_private *priv)
 {
@@ -1372,7 +1370,6 @@ static void lbs_remove_mesh(struct lbs_private *priv)
 	free_netdev(mesh_dev);
 	lbs_deb_leave(LBS_DEB_MESH);
 }
-EXPORT_SYMBOL_GPL(lbs_remove_mesh);
 
 /**
  *  @brief This function finds the CFP in
@@ -1458,20 +1455,6 @@ void lbs_interrupt(struct lbs_private *priv)
 }
 EXPORT_SYMBOL_GPL(lbs_interrupt);
 
-int lbs_reset_device(struct lbs_private *priv)
-{
-	int ret;
-
-	lbs_deb_enter(LBS_DEB_MAIN);
-	ret = lbs_prepare_and_send_command(priv, CMD_802_11_RESET,
-				    CMD_ACT_HALT, 0, 0, NULL);
-	msleep_interruptible(10);
-
-	lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
-	return ret;
-}
-EXPORT_SYMBOL_GPL(lbs_reset_device);
-
 static int __init lbs_init_module(void)
 {
 	lbs_deb_enter(LBS_DEB_MAIN);
drivers/net/wireless/rndis_wlan.c +7 -7
index 8ce2ddf..d9460ae 100644
@@ -228,9 +228,9 @@ struct NDIS_WLAN_BSSID_EX {
 	struct NDIS_802_11_SSID Ssid;
 	__le32 Privacy;
 	__le32 Rssi;
-	enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
+	__le32 NetworkTypeInUse;
 	struct NDIS_802_11_CONFIGURATION Configuration;
-	enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
+	__le32 InfrastructureMode;
 	u8 SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
 	__le32 IELength;
 	u8 IEs[0];
@@ -279,11 +279,11 @@ struct RNDIS_CONFIG_PARAMETER_INFOBUFFER {
 } __attribute__((packed));
 
 /* these have to match what is in wpa_supplicant */
-enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg;
-enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, CIPHER_WEP104 }
-	wpa_cipher;
-enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE, KEY_MGMT_802_1X_NO_WPA,
-	KEY_MGMT_WPA_NONE } wpa_key_mgmt;
+enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP };
+enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
+		  CIPHER_WEP104 };
+enum wpa_key_mgmt { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE,
+		    KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE };
 
 /*
  *  private data
drivers/net/wireless/rt2x00/rt2400pci.c +5 -1
index d6cba13..c69f85e 100644
@@ -960,8 +960,12 @@ static int rt2400pci_set_device_state(struct rt2x00_dev *rt2x00dev,
 		rt2400pci_disable_radio(rt2x00dev);
 		break;
 	case STATE_RADIO_RX_ON:
+	case STATE_RADIO_RX_ON_LINK:
+		rt2400pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		break;
 	case STATE_RADIO_RX_OFF:
-		rt2400pci_toggle_rx(rt2x00dev, state);
+	case STATE_RADIO_RX_OFF_LINK:
+		rt2400pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
 		break;
 	case STATE_DEEP_SLEEP:
 	case STATE_SLEEP:
drivers/net/wireless/rt2x00/rt2500pci.c +5 -1
index e874fdc..91e87b5 100644
@@ -1112,8 +1112,12 @@ static int rt2500pci_set_device_state(struct rt2x00_dev *rt2x00dev,
 		rt2500pci_disable_radio(rt2x00dev);
 		break;
 	case STATE_RADIO_RX_ON:
+	case STATE_RADIO_RX_ON_LINK:
+		rt2500pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		break;
 	case STATE_RADIO_RX_OFF:
-		rt2500pci_toggle_rx(rt2x00dev, state);
+	case STATE_RADIO_RX_OFF_LINK:
+		rt2500pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
 		break;
 	case STATE_DEEP_SLEEP:
 	case STATE_SLEEP:
drivers/net/wireless/rt2x00/rt2500usb.c +5 -1
index 4ca9730..638c3d2 100644
@@ -1001,8 +1001,12 @@ static int rt2500usb_set_device_state(struct rt2x00_dev *rt2x00dev,
 		rt2500usb_disable_radio(rt2x00dev);
 		break;
 	case STATE_RADIO_RX_ON:
+	case STATE_RADIO_RX_ON_LINK:
+		rt2500usb_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		break;
 	case STATE_RADIO_RX_OFF:
-		rt2500usb_toggle_rx(rt2x00dev, state);
+	case STATE_RADIO_RX_OFF_LINK:
+		rt2500usb_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
 		break;
 	case STATE_DEEP_SLEEP:
 	case STATE_SLEEP:
drivers/net/wireless/rt2x00/rt2x00config.c +6 -2
index 72cfe00..07adc57 100644
@@ -97,12 +97,16 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
 	libconf.ant.rx = rx;
 	libconf.ant.tx = tx;
 
+	if (rx == rt2x00dev->link.ant.active.rx &&
+	    tx == rt2x00dev->link.ant.active.tx)
+		return;
+
 	/*
 	 * Antenna setup changes require the RX to be disabled,
 	 * else the changes will be ignored by the device.
 	 */
 	if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
-		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
+		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF_LINK);
 
 	/*
 	 * Write new antenna setup to device and reset the link tuner.
@@ -116,7 +120,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
 	rt2x00dev->link.ant.active.tx = libconf.ant.tx;
 
 	if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
-		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON_LINK);
 }
 
 void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
drivers/net/wireless/rt2x00/rt2x00dev.c +38 -35

132 lines not on this page · raw message

drivers/net/wireless/rt2x00/rt2x00reg.h +2 -0
index 8384212..b1915dc 100644
@@ -85,6 +85,8 @@ enum dev_state {
 	STATE_RADIO_OFF,
 	STATE_RADIO_RX_ON,
 	STATE_RADIO_RX_OFF,
+	STATE_RADIO_RX_ON_LINK,
+	STATE_RADIO_RX_OFF_LINK,
 	STATE_RADIO_IRQ_ON,
 	STATE_RADIO_IRQ_OFF,
 };
drivers/net/wireless/rt2x00/rt61pci.c +5 -1
index b31f0c2..e808db9 100644
@@ -1482,8 +1482,12 @@ static int rt61pci_set_device_state(struct rt2x00_dev *rt2x00dev,
 		rt61pci_disable_radio(rt2x00dev);
 		break;
 	case STATE_RADIO_RX_ON:
+	case STATE_RADIO_RX_ON_LINK:
+		rt61pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		break;
 	case STATE_RADIO_RX_OFF:
-		rt61pci_toggle_rx(rt2x00dev, state);
+	case STATE_RADIO_RX_OFF_LINK:
+		rt61pci_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
 		break;
 	case STATE_DEEP_SLEEP:
 	case STATE_SLEEP:
drivers/net/wireless/rt2x00/rt73usb.c +5 -1
index 4d576ab..4fac2d4 100644
@@ -1208,8 +1208,12 @@ static int rt73usb_set_device_state(struct rt2x00_dev *rt2x00dev,
 		rt73usb_disable_radio(rt2x00dev);
 		break;
 	case STATE_RADIO_RX_ON:
+	case STATE_RADIO_RX_ON_LINK:
+		rt73usb_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
+		break;
 	case STATE_RADIO_RX_OFF:
-		rt73usb_toggle_rx(rt2x00dev, state);
+	case STATE_RADIO_RX_OFF_LINK:
+		rt73usb_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
 		break;
 	case STATE_DEEP_SLEEP:
 	case STATE_SLEEP:
drivers/ssb/Kconfig +5 -0
index 78fd331..adea792 100644
@@ -35,6 +35,11 @@ config SSB_PCIHOST
 
 	  If unsure, say Y
 
+config SSB_B43_PCI_BRIDGE
+	bool
+	depends on SSB_PCIHOST
+	default n
+
 config SSB_PCMCIAHOST_POSSIBLE
 	bool
 	depends on SSB && (PCMCIA = y || PCMCIA = SSB) && EXPERIMENTAL
drivers/ssb/Makefile +1 -1
index e235144..de94c2e 100644
@@ -14,6 +14,6 @@ ssb-$(CONFIG_SSB_DRIVER_PCICORE)	+= driver_pcicore.o
 
 # b43 pci-ssb-bridge driver
 # Not strictly a part of SSB, but kept here for convenience
-ssb-$(CONFIG_SSB_PCIHOST)		+= b43_pci_bridge.o
+ssb-$(CONFIG_SSB_B43_PCI_BRIDGE)	+= b43_pci_bridge.o
 
 obj-$(CONFIG_SSB)			+= ssb.o
drivers/ssb/driver_pcicore.c +1 -1
index 6d99a98..07ab48d 100644
@@ -393,7 +393,7 @@ static int pcicore_is_in_hostmode(struct ssb_pcicore *pc)
 	    chipid_top != 0x5300)
 		return 0;
 
-	if (bus->sprom.r1.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
+	if (bus->sprom.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
 		return 0;
 
 	/* The 200-pin BCM4712 package does not bond out PCI. Even when
drivers/ssb/ssb_private.h +2 -2
index a789364..21eca2b 100644
@@ -120,10 +120,10 @@ extern int ssb_devices_thaw(struct ssb_bus *bus);
 extern struct ssb_bus *ssb_pci_dev_to_bus(struct pci_dev *pdev);
 
 /* b43_pci_bridge.c */
-#ifdef CONFIG_SSB_PCIHOST
+#ifdef CONFIG_SSB_B43_PCI_BRIDGE
 extern int __init b43_pci_ssb_bridge_init(void);
 extern void __exit b43_pci_ssb_bridge_exit(void);
-#else /* CONFIG_SSB_PCIHOST */
+#else /* CONFIG_SSB_B43_PCI_BRIDGR */
 static inline int b43_pci_ssb_bridge_init(void)
 {
 	return 0;
net/mac80211/ieee80211_sta.c +4 -3
index 2019b4f..9aeed53 100644
@@ -1116,9 +1116,10 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,
 	/* prepare reordering buffer */
 	tid_agg_rx->reorder_buf =
 		kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC);
-	if ((!tid_agg_rx->reorder_buf) && net_ratelimit()) {
-		printk(KERN_ERR "can not allocate reordering buffer "
-						"to tid %d\n", tid);
+	if (!tid_agg_rx->reorder_buf) {
+		if (net_ratelimit())
+			printk(KERN_ERR "can not allocate reordering buffer "
+			       "to tid %d\n", tid);
 		goto end;
 	}
 	memset(tid_agg_rx->reorder_buf, 0,
Signature · 6 lines
John W. Linville
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

#5 lore raw

Re: pull request: wireless-2.6 2008-02-28

From: "John W. Linville" <[email protected]>
Date: Thu, 28 Feb 2008 09:51:36 -0500

Quoted 2 lines

This version drops the "Fix b43 drivers build for arm" patch, and adds a one-line build fix for SSB-attached PCI cores (found on bcm47xx mips).

Thanks.

Quoted 7 lines

P.S. This will create a merge conflict with the code I already requested that you pull for net-2.6.26. The merge is easily resolved, since it is two "comment block + single statement" additions at the same place in the file. Just take both sets of changes, and order the "Evalue antenna setup" group _after_ the "Send a signal to the led" group. I have the conflict corrected in my wireless-testing tree for reference if you need it.

Understood.

Quoted 7 lines

The following changes since commit d9595a7b9c777d45a74774f1428c263a0a47f4c0:
David S. Miller (1):
[AF_KEY]: Fix oops by converting to proc_net_*().

are available in the git repository at:

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

Pulled and pushed back out, thanks John!
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to David Miller

Hi David

Quoted 4 lines · David Miller

From: "John W. Linville" <[email protected]>
Date: Wed, 27 Feb 2008 20:41:25 -0500

Quoted 8 lines
Quoted 2 lines

Gordon Farquharson (1):
Fix b43 driver build for arm

Please revert this change and resend your pull request.

If file2alias doesn't work properly in a cross build environment, we don't fix it by crapping up mod_devalias.h with these silly align attribute annotations.

This was extensively discussed on LKML [1, 2] and the patch has been merged into Andrew Morton's -mm tree. It is understood that this is not the Right Way to fix to problem, hence the big fat comment in the code. It would be great if you could reconsider your decision.

Thanks.

Gordon

[1] http://groups.google.com/group/linux.kernel/browse_thread/thread/0013ccdcfce3feaa/608657870eb62a12?#608657870eb62a12
[2] http://groups.google.com/group/linux.kernel/browse_thread/thread/13ccdcfce3feaa/a37a5fcbb6431eb0?lnk=gst&q=Fix+b43+driver+build+for+arm#a37a5fcbb6431eb0

Signature · 2 lines
Gordon Farquharson
GnuPG Key ID: 32D6D676
maintainer
#7 lore raw

From: "Gordon Farquharson" <[email protected]>
Date: Thu, 28 Feb 2008 14:21:21 -0700

Quoted 12 lines

Hi David

Quoted 9 lines · David Miller

From: "John W. Linville" <[email protected]>
Date: Wed, 27 Feb 2008 20:41:25 -0500

Quoted 2 lines

Gordon Farquharson (1):
Fix b43 driver build for arm

Please revert this change and resend your pull request.

Quoted 8 lines
Quoted 3 lines

If file2alias doesn't work properly in a cross build environment, we don't fix it by crapping up mod_devalias.h with these silly align attribute annotations.

This was extensively discussed on LKML [1, 2] and the patch has been merged into Andrew Morton's -mm tree. It is understood that this is not the Right Way to fix to problem, hence the big fat comment in the code. It would be great if you could reconsider your decision.

If you put that thing in there now, on ARM the structure size changes as does the alignment of that final member.

Then we're stuck with it and you can't remove that hack from mod_devalias.h. It can't be removed even after the cross build issues of file2alias are resolved properly without re-breaking ARM.

Feel free to push that via Andrew or someone else, but that turd isn't going in by my tree because to me it's clearly the wrong thing to do.

A message that is not in the archive (sent off-list or not yet received): 20080228.133008.228590007.davem-fT/PcQaiUtIeIZ0/[email protected]

#9 lore raw

Hi David

Quoted 2 lines · David Miller

Feel free to push that via Andrew or someone else, but that turd isn't going in by my tree because to me it's clearly the wrong thing to do.

Would you support the idea, put forward by Matthieu Castet on LKML, to change the test in file2alias such that it issues a warning as opposed to an error?

Gordon

Signature · 6 lines
Gordon Farquharson
GnuPG Key ID: 32D6D676
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 97a0a9ac0802281556q2d65ea0fu9f59e02b989fffcf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#11 lore raw

From: "Gordon Farquharson" <[email protected]>
Date: Thu, 28 Feb 2008 16:56:52 -0700

Quoted 7 lines · David Miller
Quoted 2 lines

Feel free to push that via Andrew or someone else, but that turd isn't going in by my tree because to me it's clearly the wrong thing to do.

Would you support the idea, put forward by Matthieu Castet on LKML, to change the test in file2alias such that it issues a warning as opposed to an error?

I'm ambivalent, the only constraint is that you cannot
change the layout and alignment of this struct since it
already appeared in 2.6.24 and therefore tools have
been compiled against the existing way it is defined.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw
In reply to David Miller
Quoted 27 lines · On Thursday 28 February 2008 22:30:08 David Miller wrote:

From: "Gordon Farquharson" <[email protected]>
Date: Thu, 28 Feb 2008 14:21:21 -0700

Quoted 12 lines

Hi David

Quoted 9 lines · David Miller

From: "John W. Linville" <[email protected]>
Date: Wed, 27 Feb 2008 20:41:25 -0500

Quoted 2 lines

Gordon Farquharson (1):
Fix b43 driver build for arm

Please revert this change and resend your pull request.

Quoted 8 lines
Quoted 3 lines

If file2alias doesn't work properly in a cross build environment, we don't fix it by crapping up mod_devalias.h with these silly align attribute annotations.

This was extensively discussed on LKML [1, 2] and the patch has been merged into Andrew Morton's -mm tree. It is understood that this is not the Right Way to fix to problem, hence the big fat comment in the code. It would be great if you could reconsider your decision.

If you put that thing in there now, on ARM the structure size changes as does the alignment of that final member.

Quoted 6 lines

Then we're stuck with it and you can't remove that hack from mod_devalias.h. It can't be removed even after the cross build issues of file2alias are resolved properly without re-breaking ARM.

Feel free to push that via Andrew or someone else, but that turd isn't going in by my tree because to me it's clearly the wrong thing to do.

I didn't even think of this being an actual ABI issue when _removing_ it again. So you get another NACK from me for this patch. :)

I'm wondering if we can't simply pass a commandline parameter to file2alias that tells it whether we are crosscompiling. It should simply omit the sanity check in that case. Is there any easy and reliable way to find out whether we are crosscompiling from a makefile (I don't know the makefile core that much)?

Andrew, can you please drop it? We need to fix this differently. No matter how.

Signature · 1 line
Greetings Michael.

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

#14 lore raw
Quoted 2 lines · Michael Buesch

I'm wondering if we can't simply pass a commandline parameter to file2alias that tells it whether we are crosscompiling. It should simply omit the sanity check

Sounds reasonable to me.

Quoted 2 lines

in that case. Is there any easy and reliable way to find out whether we are crosscompiling from a makefile (I don't know the makefile core that much)?

Non-empty CROSS_COMPILE definition?

John

Signature · 6 lines
John W. Linville
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#15 lore raw
Quoted 6 lines · John W. Linville
Quoted 2 lines · Michael Buesch

I'm wondering if we can't simply pass a commandline parameter to file2alias that tells it whether we are crosscompiling. It should simply omit the sanity check

Sounds reasonable to me.

In fact, file2alias shouldn't need a command line argument ...

Quoted 4 lines
Quoted 2 lines

in that case. Is there any easy and reliable way to find out whether we are crosscompiling from a makefile (I don't know the makefile core that much)?

Non-empty CROSS_COMPILE definition?

... it can just check whether CROSS_COMPILE is set in its environment. No?

johannes

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

#17 lore raw
Quoted 11 lines · Johannes Berg
Quoted 6 lines · John W. Linville
Quoted 2 lines · Michael Buesch

I'm wondering if we can't simply pass a commandline parameter to file2alias that tells it whether we are crosscompiling. It should simply omit the sanity check

Sounds reasonable to me.

In fact, file2alias shouldn't need a command line argument ...

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

in that case. Is there any easy and reliable way to find out whether we are crosscompiling from a makefile (I don't know the makefile core that much)?

Non-empty CROSS_COMPILE definition?

... it can just check whether CROSS_COMPILE is set in its environment. No?

Not a bad idea...something like this?

---

modpost: avoid user/kernel struct size compat check if cross-compiling

---
 scripts/mod/file2alias.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
scripts/mod/file2alias.c +7 -0
index 9ddf944..040721e 100644
@@ -10,6 +10,7 @@
  * of the GNU General Public License, incorporated herein by reference.
  */
 
+#include <stdlib.h>
 #include "modpost.h"
 
 /* We use the ELF typedefs for kernel_ulong_t but bite the bullet and
@@ -63,6 +64,12 @@ static void device_id_check(const char *modname, const char *device_id,
 {
 	int i;
 
+	if (getenv("CROSS_COMPILE")) {
+		warn("%s: cross-compile can not verify userspace/kernel "
+		     "structure size compatibility.\n", modname);
+		return;
+	}
+
 	if (size % id_size || size < id_size) {
 		fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
 		      "of the size of section __mod_%s_device_table=%lu.\n"
Signature · 9 lines
1.5.3.3

-- 
John W. Linville
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#18 lore raw
Quoted 5 lines
Quoted 3 lines

... it can just check whether CROSS_COMPILE is set in its environment. No?

Not a bad idea...something like this?

*shrug* I don't even know what the thread is about :) Just interfering ;)

johannes

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

#20 lore raw
Quoted 15 lines · John W. Linville
Quoted 14 lines · Johannes Berg
Quoted 6 lines · John W. Linville
Quoted 2 lines · Michael Buesch

I'm wondering if we can't simply pass a commandline parameter to file2alias that tells it whether we are crosscompiling. It should simply omit the sanity check

Sounds reasonable to me.

In fact, file2alias shouldn't need a command line argument ...

Quoted 3 lines
Quoted 2 lines

in that case. Is there any easy and reliable way to find out whether we are crosscompiling from a makefile (I don't know the makefile core that much)?

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Non-empty CROSS_COMPILE definition?

... it can just check whether CROSS_COMPILE is set in its environment. No?

Not a bad idea...something like this?

That version didn't work -- it seems CROSS_COMPILE is always set, even if it is empty.

This version seems to work, but it is a bit chatty when CROSS_COMPILE is set and you build lots of modules...thoughts?

John

---

modpost: avoid user/kernel struct size compat check if cross-compiling

---
 scripts/mod/file2alias.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
scripts/mod/file2alias.c +9 -0
index 9ddf944..37f311e 100644
@@ -10,6 +10,7 @@
  * of the GNU General Public License, incorporated herein by reference.
  */
 
+#include <stdlib.h>
 #include "modpost.h"
 
 /* We use the ELF typedefs for kernel_ulong_t but bite the bullet and
@@ -62,6 +63,14 @@ static void device_id_check(const char *modname, const char *device_id,
 			    void *symval)
 {
 	int i;
+	char *cross_compile;
+
+	cross_compile = getenv("CROSS_COMPILE");
+	if (cross_compile && strlen(cross_compile)) {
+		warn("%s: cross-compile cannot verify userspace/kernel "
+		     "structure size compatibility.\n", modname);
+		return;
+	}
 
 	if (size % id_size || size < id_size) {
 		fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
Signature · 9 lines
1.5.3.3

-- 
John W. Linville
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#21 lore raw
Quoted 21 lines · John W. Linville
Quoted 20 lines · John W. Linville
Quoted 18 lines · Johannes Berg
Quoted 6 lines · John W. Linville
Quoted 2 lines · Michael Buesch

I'm wondering if we can't simply pass a commandline parameter to file2alias that tells it whether we are crosscompiling. It should simply omit the sanity check

Sounds reasonable to me.

In fact, file2alias shouldn't need a command line argument ...

Quoted 4 lines
Quoted 2 lines

in that case. Is there any easy and reliable way to find out whether we are crosscompiling from a makefile (I don't know the makefile core that much)?

Non-empty CROSS_COMPILE definition?

... it can just check whether CROSS_COMPILE is set in its environment. No?

Quoted 7 lines
Quoted 1 line

Not a bad idea...something like this?

That version didn't work -- it seems CROSS_COMPILE is always set, even if it is empty.

This version seems to work, but it is a bit chatty when CROSS_COMPILE is set and you build lots of modules...thoughts?

We cannot use CROSS_COMPILE to detect a cross build as CROSS_COMPILE is used used to select different gcc versions, cccache etc. The only relaiably way to detect a cross build is to check is ARCH != modified uname -m arch.
So this check would have to be done in the top-level Makefile.

And that for shaving 6 bytes of a structure..

Sam

A message that is not in the archive (sent off-list or not yet received): 20080301130133.GA14250-QabhHTsIXMSnlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org

#23 lore raw
Quoted 10 lines · Sam Ravnborg
Quoted 2 lines

This version seems to work, but it is a bit chatty when CROSS_COMPILE is set and you build lots of modules...thoughts?

We cannot use CROSS_COMPILE to detect a cross build as CROSS_COMPILE is used used to select different gcc versions, cccache etc. The only relaiably way to detect a cross build is to check is ARCH != modified uname -m arch.
So this check would have to be done in the top-level Makefile.

And that for shaving 6 bytes of a structure..

Wrong. For maintaining userspace ABI compatibility.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#24 lore raw
Quoted 10 lines · Michael Buesch
Quoted 9 lines · Sam Ravnborg
Quoted 2 lines

This version seems to work, but it is a bit chatty when CROSS_COMPILE is set and you build lots of modules...thoughts?

We cannot use CROSS_COMPILE to detect a cross build as CROSS_COMPILE is used used to select different gcc versions, cccache etc. The only relaiably way to detect a cross build is to check is ARCH != modified uname -m arch.
So this check would have to be done in the top-level Makefile.

Quoted 3 lines
Quoted 1 line

And that for shaving 6 bytes of a structure..

Wrong. For maintaining userspace ABI compatibility.

NEws to me - that argument I did not see when I posted my previous mail about possible worarounds.
Find below a patch that detect when we do a cross build and thus ignore the check.

This is NOT tested as I do not have access to my dev box atm. I have only tested I could build a i386 kernel.

So please let me know if this works and then I can push it upstrem hopefully already by tomorrow.

Note: I decided to name the variable KBUILD_BUILDHOST as this is more descriptive then SUBARCH. We can later clean up the naming and get rid of SUBARCH but I refrained from this to make the pacht minimal.

Sam

Makefile +1 -1
index a229784..de28306 100644
@@ -189,7 +189,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
 # Alternatively CROSS_COMPILE can be set in the environment.
 # Default value for CROSS_COMPILE is not to prefix executables
 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
-
+export KBUILD_BUILDHOST := $(SUBARCH)
 ARCH		?= $(SUBARCH)
 CROSS_COMPILE	?=
 
scripts/Makefile.modpost +5 -1
index cfc004e..2d20640 100644
@@ -58,6 +58,9 @@ modules   := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o)))
 # Stop after building .o files if NOFINAL is set. Makes compile tests quicker
 _modpost: $(if $(KBUILD_MODPOST_NOFINAL), $(modules:.ko:.o),$(modules))
 
+ifneq ($(KBUILD_BUILDHOST),$(ARCH))
+        cross_build := 1
+endif
 
 # Step 2), invoke modpost
 #  Includes step 3,4
@@ -70,7 +73,8 @@ modpost = scripts/mod/modpost                    \
  $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S)      \
  $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \
  $(if $(CONFIG_MARKERS),-M $(markersfile))	 \
- $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
+ $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
+ $(if $(cross_build),-c)
 
 quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
       cmd_modpost = $(modpost) -s
scripts/mod/file2alias.c +4 -0
index 9ddf944..348d868 100644
@@ -51,11 +51,13 @@ do {                                                            \
                 sprintf(str + strlen(str), "*");                \
 } while(0)
 
+unsigned int cross_build = 0;
 /**
  * Check that sizeof(device_id type) are consistent with size of section
  * in .o file. If in-consistent then userspace and kernel does not agree
  * on actual size which is a bug.
  * Also verify that the final entry in the table is all zeros.
+ * Ignore both checks if build host differ from target host and size differs.
  **/
 static void device_id_check(const char *modname, const char *device_id,
 			    unsigned long size, unsigned long id_size,
@@ -64,6 +66,8 @@ static void device_id_check(const char *modname, const char *device_id,
 	int i;
 
 	if (size % id_size || size < id_size) {
+		if (cross_build != 0)
+			return;
 		fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
 		      "of the size of section __mod_%s_device_table=%lu.\n"
 		      "Fix definition of struct %s_device_id "
scripts/mod/modpost.c +4 -1
index 695b5d6..110cf24 100644
@@ -2026,7 +2026,7 @@ int main(int argc, char **argv)
 	int opt;
 	int err;
 
-	while ((opt = getopt(argc, argv, "i:I:msSo:awM:K:")) != -1) {
+	while ((opt = getopt(argc, argv, "i:I:cmsSo:awM:K:")) != -1) {
 		switch (opt) {
 		case 'i':
 			kernel_read = optarg;
@@ -2035,6 +2035,9 @@ int main(int argc, char **argv)
 			module_read = optarg;
 			external_module = 1;
 			break;
+		case 'c':
+			cross_build = 1;
+			break;
 		case 'm':
 			modversions = 1;
 			break;
scripts/mod/modpost.h +1 -0
index 565c587..09f58e3 100644
@@ -135,6 +135,7 @@ struct elf_info {
 };
 
 /* file2alias.c */
+extern unsigned int cross_build;
 void handle_moddevtable(struct module *mod, struct elf_info *info,
 			Elf_Sym *sym, const char *symname);
 void add_moddevtable(struct buffer *buf, struct module *mod);

A message that is not in the archive (sent off-list or not yet received): 97a0a9ac0803021200v117379b6x1c4bc0f8ae580040-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#27 lore raw
Quoted 10 lines · On Sunday 02 March 2008 21:00:23 Gordon Farquharson wrote:

Hi Sam

Quoted 2 lines · Sam Ravnborg

Find below a patch that detect when we do a cross build and thus ignore the check.

Works for me.

The patch looks good. I suggest Andrew pull it for some time into the -mm tree and then pushes it forward to Linus for 2.6.25.

You can add an Acked-by: Michael Buesch <[email protected]> although I can not runtime test it here.

Signature · 5 lines
Greetings Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20080302115828.GA15820-QabhHTsIXMSnlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org

#29 lore raw

Hi Sam

Quoted 6 lines · Sam Ravnborg

So please let me know if this works and then I can push it upstrem hopefully already by tomorrow.

Note: I decided to name the variable KBUILD_BUILDHOST as this is more descriptive then SUBARCH. We can later clean up the naming and get rid of SUBARCH but I refrained from this to make the pacht minimal.

What is the status of this patch? Is there any chance that it will be included in 2.6.25?

Thanks.

Gordon

Signature · 6 lines
Gordon Farquharson
GnuPG Key ID: 32D6D676
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#30 lore raw
Quoted 7 lines · Gordon Farquharson

Hi Sam

Quoted 3 lines · Sam Ravnborg

So please let me know if this works and then I can push it upstrem hopefully already by tomorrow.

Quoted 6 lines
Quoted 3 lines

Note: I decided to name the variable KBUILD_BUILDHOST as this is more descriptive then SUBARCH. We can later clean up the naming and get rid of SUBARCH but I refrained from this to make the pacht minimal.

What is the status of this patch? Is there any chance that it will be included in 2.6.25?

Thanks for your paitience.
I have been outright busy so I never came around to this. It is pushed for inclusion in 2.6.25 now.

Sam

A message that is not in the archive (sent off-list or not yet received): 20080323205126.GB5087-QabhHTsIXMSnlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org

#32 lore raw

Hi Sam

Quoted 3 lines · Sam Ravnborg

Thanks for your paitience.
I have been outright busy so I never came around to this. It is pushed for inclusion in 2.6.25 now.

Thanks, Sam. Sorry to have bugged you a little :-) Also, thanks very much for creating the patch in the first place.

Gordon

Signature · 6 lines
Gordon Farquharson
GnuPG Key ID: 32D6D676
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#33 lore raw
In reply to a message not in the archive

From: Sam Ravnborg <[email protected]>
Date: Sat, 1 Mar 2008 14:01:33 +0100

Quoted 1 line

And that for shaving 6 bytes of a structure..

No, it's for not breaking existing userland binaries out there. We released 2.6.24 with the existing struct layout, we have to live with it.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#34 lore raw
In reply to Sam Ravnborg
Quoted 30 lines · Sam Ravnborg
Quoted 21 lines · John W. Linville
Quoted 20 lines · John W. Linville
Quoted 18 lines · Johannes Berg
Quoted 6 lines · John W. Linville
Quoted 2 lines · Michael Buesch

I'm wondering if we can't simply pass a commandline parameter to file2alias that tells it whether we are crosscompiling. It should simply omit the sanity check

Sounds reasonable to me.

In fact, file2alias shouldn't need a command line argument ...

Quoted 4 lines
Quoted 2 lines

in that case. Is there any easy and reliable way to find out whether we are crosscompiling from a makefile (I don't know the makefile core that much)?

Non-empty CROSS_COMPILE definition?

... it can just check whether CROSS_COMPILE is set in its environment. No?

Quoted 7 lines
Quoted 1 line

Not a bad idea...something like this?

That version didn't work -- it seems CROSS_COMPILE is always set, even if it is empty.

This version seems to work, but it is a bit chatty when CROSS_COMPILE is set and you build lots of modules...thoughts?

Quoted 7 lines

We cannot use CROSS_COMPILE to detect a cross build as CROSS_COMPILE is used used to select different gcc versions, cccache etc. The only relaiably way to detect a cross build is to check is ARCH != modified uname -m arch.
So this check would have to be done in the top-level Makefile.

And that for shaving 6 bytes of a structure..

I remember two other occassions where this file2alias mess has bitten us recently.

I don't mind that much how it gets fixed, but the current status quo of having this kind of problems again and again is simply not acceptable.

Quoted 1 line

Sam

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#35 lore raw
In reply to a message not in the archive
Quoted 10 lines · On Friday 29 February 2008 17:34:13 Johannes Berg wrote:
Quoted 6 lines · John W. Linville
Quoted 2 lines · Michael Buesch

I'm wondering if we can't simply pass a commandline parameter to file2alias that tells it whether we are crosscompiling. It should simply omit the sanity check

Sounds reasonable to me.

In fact, file2alias shouldn't need a command line argument ...

Well, if...

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

in that case. Is there any easy and reliable way to find out whether we are crosscompiling from a makefile (I don't know the makefile core that much)?

Non-empty CROSS_COMPILE definition?

... it can just check whether CROSS_COMPILE is set in its environment. No?

Is that exported to the environment?

Signature · 5 lines
Greetings Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

#37 lore raw
Quoted 17 lines · On Sat, 1 Mar 2008 00:13:11 +0100 Michael Buesch wrote:
Quoted 10 lines · On Friday 29 February 2008 17:34:13 Johannes Berg wrote:
Quoted 6 lines · John W. Linville
Quoted 2 lines · Michael Buesch

I'm wondering if we can't simply pass a commandline parameter to file2alias that tells it whether we are crosscompiling. It should simply omit the sanity check

Sounds reasonable to me.

In fact, file2alias shouldn't need a command line argument ...

Well, if...

Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

in that case. Is there any easy and reliable way to find out whether we are crosscompiling from a makefile (I don't know the makefile core that much)?

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Non-empty CROSS_COMPILE definition?

... it can just check whether CROSS_COMPILE is set in its environment. No?

Is that exported to the environment?

Certainly, in top-level Makefile:

export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS

---
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html