Skip to contentSkip to conversation

Adds configure_filter() support for zd1211rw-mac80211

PATCH In review Luis R. Rodriguez 2 participants 2 messages Sep 28, 2007 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Adds configure_filter() support for zd1211rw-mac80211

Resending.. it seems my mail setup isn't quite right yet..

This patch:

* Moves driver to new start() / stop()
* Removes the old zd_op_set_multicast_list()
* Adds the new configure_filter() support
* Fixes compile errors as it depends on the removed DECLARE_MAC_BUF, and print_mac()

This has been tested, and applies to the 'everything' branch of wireless-2.6.

Cc Daniel Drake <[email protected]>
Cc Ulrich Kunitz <[email protected]>
Cc Johannes Berg <[email protected]>
Cc Michael Wu <[email protected]>

---

 drivers/net/wireless/zd1211rw-mac80211/zd_chip.c |    9 +++-
 drivers/net/wireless/zd1211rw-mac80211/zd_mac.c  |   53 ++++++++++++++-------
 2 files changed, 42 insertions(+), 20 deletions(-)
drivers/net/wireless/zd1211rw-mac80211/zd_chip.c +7 -2
index 0dc75c2..d3a578b 100644
@@ -377,7 +377,9 @@ int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr)
 		[0] = { .addr = CR_MAC_ADDR_P1 },
 		[1] = { .addr = CR_MAC_ADDR_P2 },
 	};
-	DECLARE_MAC_BUF(mac);
+	/* Add back later when this is added */
+	//DECLARE_MAC_BUF(mac);
+	char mac[18];
 
 	reqs[0].value = (mac_addr[3] << 24)
 		      | (mac_addr[2] << 16)
@@ -386,8 +388,11 @@ int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr)
 	reqs[1].value = (mac_addr[5] <<  8)
 		      |  mac_addr[4];
 
+	/* same here, add back when print_mac() is added */
 	dev_dbg_f(zd_chip_dev(chip),
-		"mac addr %s\n", print_mac(mac, mac_addr));
+	//	"mac addr %s\n", print_mac(mac, mac_addr));
+		"mac addr %s\n", MAC_FMT, MAC_ARG(mac));
+
 
 	mutex_lock(&chip->mutex);
 	r = zd_iowrite32a_locked(chip, reqs, ARRAY_SIZE(reqs));
drivers/net/wireless/zd1211rw-mac80211/zd_mac.c +35 -18

102 lines not on this page · raw message

#1 lore raw

drivers/net/wireless/zd1211rw-mac80211/zd_mac.c static void kfree_tx_skb(struct sk_buff *skb) · line 295

Quoted 2 lines · Luis R. Rodriguez
drivers/net/wireless/zd1211rw-mac80211/zd_mac.c +1 -1
-static int zd_op_stop(struct ieee80211_hw *hw)
+void zd_op_stop(struct ieee80211_hw *hw)

static

drivers/net/wireless/zd1211rw-mac80211/zd_mac.c static void set_multicast_hash_handler(struct work_struct *work) · line 791

Quoted 12 lines
drivers/net/wireless/zd1211rw-mac80211/zd_mac.c +12 -0
+	/* Only deal with supported flags */
+	changed_flags &= SUPPORTED_FIF_FLAGS;
+	*new_flags &= SUPPORTED_FIF_FLAGS;
+
+	/* changed_flags is always populated but this driver
+	 * doesn't support all FIF flags so its possible we don't
+	 * need to do anything */
+	if (!changed_flags)
+		return;
+
+	if ((*new_flags & (FIF_PROMISC_IN_BSS | FIF_ALLMULTI)) ||
+	     has_monitor_interfaces(mac)) {

Inconsistent use of SUPPORTED_FIF_FLAGS vs. FIF_PROMISC_IN_BSS | FIF_ALLMULTI.

Also, mac address configuration should be moved to add_interface from the start callback.

-Michael Wu