Skip to contentSkip to conversation

mwl8k: Marvell TOPDOG wireless driver

PATCH In review Lennert Buytenhek 2 participants 4 messages Mar 10, 2009 – Mar 13, 2009 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mwl8k: Marvell TOPDOG wireless driver

Add a driver for Marvell 88w8xxx TOPDOG PCI/PCIe wireless parts. This initial version supports the 88w8687 802.11b/g PCIe part on channels 1-11, and only STA mode is currently implemented.

---
This version addresses all review feedback so far. Please consider applying.

drivers/net/wireless/Kconfig +9 -0
index 1294175..612fffe 100644
@@ -473,6 +473,15 @@ config MAC80211_HWSIM
 	  To compile this driver as a module, choose M here: the module will be
 	  called mac80211_hwsim.  If unsure, say N.
 
+config MWL8K
+	tristate "Marvell 88W8xxx PCI/PCIe Wireless support"
+	depends on MAC80211 && PCI && WLAN_80211 && EXPERIMENTAL
+	---help---
+	  This driver supports Marvell TOPDOG 802.11 wireless cards.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called mwl8k.  If unsure, say N.
+
 source "drivers/net/wireless/p54/Kconfig"
 source "drivers/net/wireless/ath5k/Kconfig"
 source "drivers/net/wireless/ath9k/Kconfig"
drivers/net/wireless/Makefile +2 -0
index e2574ca..d780487 100644
@@ -48,6 +48,8 @@ obj-$(CONFIG_LIBERTAS_THINFIRM)	+= libertas_tf/
 
 obj-$(CONFIG_ADM8211)	+= adm8211.o
 
+obj-$(CONFIG_MWL8K)	+= mwl8k.o
+
 obj-$(CONFIG_IWLWIFI)	+= iwlwifi/
 obj-$(CONFIG_RT2X00)	+= rt2x00/
 
drivers/net/wireless/mwl8k.c new file +3789 -0

2,977 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

maintainer
#1 lore raw
Quoted 3 lines · Lennert Buytenhek

Add a driver for Marvell 88w8xxx TOPDOG PCI/PCIe wireless parts. This initial version supports the 88w8687 802.11b/g PCIe part on channels 1-11, and only STA mode is currently implemented.

my 64-bit powerpc box says:

drivers/net/wireless/mwl8k.c: In function ‘mwl8k_rxq_init’:
drivers/net/wireless/mwl8k.c:897: warning: large integer implicitly truncated to unsigned type

johannes

maintainer
#2 lore raw
Quoted 10 lines · Johannes Berg
Quoted 3 lines · Lennert Buytenhek

Add a driver for Marvell 88w8xxx TOPDOG PCI/PCIe wireless parts. This initial version supports the 88w8687 802.11b/g PCIe part on channels 1-11, and only STA mode is currently implemented.

my 64-bit powerpc box says:

drivers/net/wireless/mwl8k.c: In function ‘mwl8k_rxq_init’:
drivers/net/wireless/mwl8k.c:897: warning: large integer implicitly truncated to unsigned type

And sparse has something to say too:

drivers/net/wireless/mwl8k.c:1595:9: warning: incorrect type in assignment (different address spaces)
drivers/net/wireless/mwl8k.c:1595:9: expected unsigned short [noderef] [usertype] <asn:2>*result
drivers/net/wireless/mwl8k.c:1595:9: got unsigned short *<noident>
drivers/net/wireless/mwl8k.c:897:4: warning: cast truncates bits from constant value (2000000 becomes 0) drivers/net/wireless/mwl8k.c:1606:9: warning: dereference of noderef expression drivers/net/wireless/mwl8k.c:1611:12: warning: dereference of noderef expression

johannes

maintainer
#3 lore raw
In reply to Lennert Buytenhek

drivers/net/wireless/mwl8k.c line 1039

Quoted 7 lines · Lennert Buytenhek
drivers/net/wireless/mwl8k.c new file +7 -0
+		/*
+		 * Check for pending join operation. save a copy of
+		 * the beacon and schedule a tasklet to send finalize
+		 * join command to the firmware.
+		 */
+		if (mwl8k_capture_bssid(priv, wh))
+			mwl8k_save_beacon(priv, skb);

This raises an interesting problem I'm debugging in iwlwifi right now -- when you suspend/resume mac80211 assumes, currently, that all it has to do is completely reconfigure the hardware (cf. net/mac80211/pm.c, __ieee80211_resume()), it is currently missing this piece of code though:

        list_for_each_entry(sdata, &local->interfaces, list) {
                if (!netif_running(sdata->dev))
                        continue;
                if (sdata->vif.type == NL80211_IFTYPE_MONITOR)
                        continue;
                ieee80211_if_config(sdata, ~0);
                ieee80211_bss_info_change_notify(sdata, ~0);
        }

(Think about it for a second before I explain)

This means that after resume, the finalize join command will not be run, although mac80211 assumes that it is connected to the AP, and the firmware was reset completely.

We may be disconnected if we sleep for too long, but that is acceptable, as soon as we send something the AP will then throw us out and we go through the association procedure again. We may want to add some code to detect that (maybe just send a nullfunc "going to sleep" before suspend, and "awake now" after resume?) but it should work anyway.

I don't have a good solution right now. We could always go through the assoc process again, but that seems wasteful. Or we could just have mac80211 hand down the beacon/probe response data in the assoc setting (bss config)

johannes