Skip to contentSkip to conversation

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

PATCH John W. Linville 3 participants 4 messages Aug 6, 2007 – Aug 9, 2007

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

Some fixes intended for 2.6.23. Individual patches available here:

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

Thanks!

John
---

The following changes since commit d4ac2477fad0f2680e84ec12e387ce67682c5c13:
Linus Torvalds (1):

        Linux 2.6.23-rc2

are available in the git repository at:

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

Daniel Drake (2):
mac80211: missing dev_put in ieee80211_master_start_xmit
mac80211: don't allow scanning in monitor mode

Zhu Yi (2):
mac80211: use do { } while (0) for multi-line macros
mac80211: Fix sparse error for sta_last_seq_ctrl_read

 net/mac80211/debugfs_netdev.c  |    8 +++++---
 net/mac80211/debugfs_sta.c     |    2 +-
 net/mac80211/ieee80211.c       |    1 +
 net/mac80211/ieee80211_ioctl.c |   19 +++++++++++++------
 4 files changed, 20 insertions(+), 10 deletions(-)
net/mac80211/debugfs_netdev.c +5 -3
index 799a920..095be91 100644
@@ -271,9 +271,11 @@ static void add_files(struct ieee80211_sub_if_data *sdata)
 	}
 }
 
-#define DEBUGFS_DEL(name, type)\
-	debugfs_remove(sdata->debugfs.type.name);\
-	sdata->debugfs.type.name = NULL;
+#define DEBUGFS_DEL(name, type)					\
+	do {							\
+		debugfs_remove(sdata->debugfs.type.name);	\
+		sdata->debugfs.type.name = NULL;		\
+	} while (0)
 
 static void del_sta_files(struct ieee80211_sub_if_data *sdata)
 {
net/mac80211/debugfs_sta.c +1 -1
index d41e696..da34ea7 100644
@@ -157,7 +157,7 @@ static ssize_t sta_last_seq_ctrl_read(struct file *file, char __user *userbuf,
 	struct sta_info *sta = file->private_data;
 	for (i = 0; i < NUM_RX_DATA_QUEUES; i++)
 		p += scnprintf(p, sizeof(buf)+buf-p, "%x ",
-			       sta->last_seq_ctrl[i]);
+			       le16_to_cpu(sta->last_seq_ctrl[i]));
 	p += scnprintf(p, sizeof(buf)+buf-p, "\n");
 	return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
 }
net/mac80211/ieee80211.c +1 -0
index c944b17..8ec5ed1 100644
@@ -1650,6 +1650,7 @@ static int ieee80211_master_start_xmit(struct sk_buff *skb,
 	if (skb_headroom(skb) < headroom) {
 		if (pskb_expand_head(skb, headroom, 0, GFP_ATOMIC)) {
 			dev_kfree_skb(skb);
+			dev_put(odev);
 			return 0;
 		}
 	}
net/mac80211/ieee80211_ioctl.c +13 -6
index d0e1ab5..e7904db 100644
@@ -697,17 +697,24 @@ static int ieee80211_ioctl_siwscan(struct net_device *dev,
 	if (!netif_running(dev))
 		return -ENETDOWN;
 
-	if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
-		if (sdata->type == IEEE80211_IF_TYPE_STA ||
-		    sdata->type == IEEE80211_IF_TYPE_IBSS) {
+	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;
-		} else if (sdata->type == IEEE80211_IF_TYPE_AP) {
+		}
+		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;
-		} else
-			return -EINVAL;
+		}
+		break;
+	default:
+		return -EOPNOTSUPP;
 	}
+
 	return ieee80211_sta_req_scan(dev, ssid, ssid_len);
 }
 
Signature · 2 lines
John W. Linville
[email protected]
#1 lore raw

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

Some stuff for 2.6.24, when you are ready for it.

Individual patches here:

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

Thanks!

John

---

The following changes since commit f27b62d3e7ecca42a75f1c5d3cc225539301ba6d:
Daniel Drake (1):
mac80211: don't allow scanning in monitor mode

are available in the git repository at:

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

Andy Green (2):
mac80211: Add get_unaligned to ieee80211_get_radiotap_len
mac80211: Improve sanity checks on injected packets

Daniel Drake (3):
mac80211: STA reassociation improvements
mac80211: improved short preamble handling
mac80211: implement ERP info change notifications

Ivo van Doorn (1):

      mac80211: Add LONG_RETRY flag to ieee80211_tx_control

Johannes Berg (14):
mac80211: split RX handlers into own file
mac80211: move QoS rx handlers into rx.c
mac80211: rx cleanups (1)
mac80211: split ieee80211_rx_h_check handler
mac80211: split up __ieee80211_rx
mac80211: fix bug for per-sta stats
mac80211: rx cleanups (2)
mac80211: split TX path into own file
mac80211: remove some unnecessary includes
mac80211: split out some key functions from ieee80211.c
mac80211: move some rate control functions out of ieee80211.c
mac80211: reorder interface related functions
mac80211: introduce util.c
mac80211: fix add_interface monitor mode behaviour

Michael Wu (2):
mac80211: improve locking of sta_info related structures
mac80211: use more GFP_KERNEL instead of GFP_ATOMIC

Thomas Graf (1):
Use type safe netlink interface

 drivers/net/wireless/rtl8187.h     |    1 +
 drivers/net/wireless/rtl8187_dev.c |    4 +-
 include/net/ieee80211_radiotap.h   |   10 +
 include/net/mac80211.h             |   34 +-
 net/mac80211/Makefile              |    6 +-
 net/mac80211/ieee80211.c           | 4492 ++++--------------------------------
 net/mac80211/ieee80211_i.h         |   74 +-
 net/mac80211/ieee80211_iface.c     |    2 +-
 net/mac80211/ieee80211_ioctl.c     |   17 +-
 net/mac80211/ieee80211_rate.c      |   42 +
 net/mac80211/ieee80211_rate.h      |    6 +
 net/mac80211/ieee80211_sta.c       |   60 +-
 net/mac80211/key.c                 |   69 +
 net/mac80211/rx.c                  | 1453 ++++++++++++
 net/mac80211/sta_info.c            |  184 +-
 net/mac80211/sta_info.h            |   11 +-
 net/mac80211/tx.c                  | 1883 +++++++++++++++
 net/mac80211/util.c                |  488 ++++
 net/mac80211/wme.c                 |   65 -
 net/mac80211/wme.h                 |    9 +-
 net/wireless/wext.c                |   30 +-
 21 files changed, 4590 insertions(+), 4350 deletions(-)
 create mode 100644 net/mac80211/key.c
 create mode 100644 net/mac80211/rx.c
 create mode 100644 net/mac80211/tx.c
 create mode 100644 net/mac80211/util.c
drivers/net/wireless/rtl8187.h +1 -0
index 6124e46..7993b3d 100644
@@ -67,6 +67,7 @@ struct rtl8187_priv {
 	struct rtl818x_csr *map;
 	void (*rf_init)(struct ieee80211_hw *);
 	int mode;
+	int if_id;
 
 	/* rtl8187 specific */
 	struct ieee80211_channel channels[14];
drivers/net/wireless/rtl8187_dev.c +3 -1
index cea8589..c79663c 100644
@@ -96,7 +96,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
 	if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) {
 		tmp |= RTL8187_TX_FLAG_RTS;
 		hdr->rts_duration =
-			ieee80211_rts_duration(dev, skb->len, control);
+			ieee80211_rts_duration(dev, priv->if_id, skb->len, control);
 	}
 	if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)
 		tmp |= RTL8187_TX_FLAG_CTS;
@@ -510,6 +510,8 @@ static int rtl8187_config_interface(struct ieee80211_hw *dev, int if_id,
 	struct rtl8187_priv *priv = dev->priv;
 	int i;
 
+	priv->if_id = if_id;
+
 	for (i = 0; i < ETH_ALEN; i++)
 		rtl818x_iowrite8(priv, &priv->map->BSSID[i], conf->bssid[i]);
 
include/net/ieee80211_radiotap.h +10 -0
index a0c2b41..dfd8bf6 100644
@@ -40,6 +40,7 @@
 
 #include <linux/if_ether.h>
 #include <linux/kernel.h>
+#include <asm/unaligned.h>
 
 /* Radiotap header version (from official NetBSD feed) */
 #define IEEE80211RADIOTAP_VERSION	"1.5"
@@ -255,4 +256,13 @@ enum ieee80211_radiotap_type {
 	(((x) == 14) ? 2484 : ((x) * 5) + 2407) : \
 	((x) + 1000) * 5)
 
+/* helpers */
+static inline int ieee80211_get_radiotap_len(unsigned char *data)
+{
+	struct ieee80211_radiotap_header *hdr =
+		(struct ieee80211_radiotap_header *)data;
+
+	return le16_to_cpu(get_unaligned(&hdr->it_len));
+}
+
 #endif				/* IEEE80211_RADIOTAP_H */
include/net/mac80211.h +26 -8
index c34fd9a..e503cd3 100644
@@ -192,9 +192,15 @@ struct ieee80211_tx_control {
 #define IEEE80211_TXCTL_FIRST_FRAGMENT	(1<<8) /* this is a first fragment of
 						* the frame */
 #define IEEE80211_TXCTL_TKIP_NEW_PHASE1_KEY (1<<9)
+#define IEEE80211_TXCTL_LONG_RETRY_LIMIT (1<<10) /* this frame should be send
+						  * using the through
+						  * set_retry_limit configured
+						  * long retry value */
 	u32 flags;			       /* tx control flags defined
 						* above */
-	u8 retry_limit;		/* 1 = only first attempt, 2 = one retry, .. */
+	u8 retry_limit;		/* 1 = only first attempt, 2 = one retry, ..
+				 * This could be used when set_retry_limit
+				 * is not implemented by the driver */
 	u8 power_level;		/* per-packet transmit power level, in dBm */
 	u8 antenna_sel_tx; 	/* 0 = default/diversity, 1 = Ant0, 2 = Ant1 */
 	s8 key_idx;		/* -1 = do not encrypt, >= 0 keyidx from
@@ -626,8 +632,7 @@ struct ieee80211_ops {
 	 * station hwaddr for individual keys. aid of the station is given
 	 * to help low-level driver in selecting which key->hw_key_idx to use
 	 * for this key. TX control data will use the hw_key_idx selected by
-	 * the low-level driver.
-	 * Must be atomic. */
+	 * the low-level driver. */
 	int (*set_key)(struct ieee80211_hw *hw, set_key_cmd cmd,
 		       u8 *addr, struct ieee80211_key_conf *key, int aid);
 
@@ -692,6 +697,14 @@ struct ieee80211_ops {
 	void (*sta_table_notification)(struct ieee80211_hw *hw,
 				       int num_sta);
 
+	/* Handle ERP IE change notifications. Must be atomic. */
+	void (*erp_ie_changed)(struct ieee80211_hw *hw, u8 changes,
+			       int cts_protection, int preamble);
+
+	/* Flags for the erp_ie_changed changes parameter */
+#define IEEE80211_ERP_CHANGE_PROTECTION (1<<0) /* protection flag changed */
+#define IEEE80211_ERP_CHANGE_PREAMBLE (1<<1) /* barker preamble mode changed */
+
 	/* Configure TX queue parameters (EDCF (aifs, cw_min, cw_max),
 	 * bursting) for a hardware TX queue.
 	 * queue = IEEE80211_TX_QUEUE_*.
@@ -830,6 +843,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
 /**
  * ieee80211_rts_get - RTS frame generation function
  * @hw: pointer obtained from ieee80211_alloc_hw().
+ * @if_id: interface ID from &struct ieee80211_if_init_conf.
  * @frame: pointer to the frame that is going to be protected by the RTS.
  * @frame_len: the frame length (in octets).
  * @frame_txctl: &struct ieee80211_tx_control of the frame.
@@ -840,7 +854,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
  * the next RTS frame from the 802.11 code. The low-level is responsible
  * for calling this function before and RTS frame is needed.
  */
-void ieee80211_rts_get(struct ieee80211_hw *hw,
+void ieee80211_rts_get(struct ieee80211_hw *hw, int if_id,
 		       const void *frame, size_t frame_len,
 		       const struct ieee80211_tx_control *frame_txctl,
 		       struct ieee80211_rts *rts);
@@ -848,6 +862,7 @@ void ieee80211_rts_get(struct ieee80211_hw *hw,
 /**
  * ieee80211_rts_duration - Get the duration field for an RTS frame
  * @hw: pointer obtained from ieee80211_alloc_hw().
+ * @if_id: interface ID from &struct ieee80211_if_init_conf.
  * @frame_len: the length of the frame that is going to be protected by the RTS.
  * @frame_txctl: &struct ieee80211_tx_control of the frame.
  *
@@ -855,13 +870,14 @@ void ieee80211_rts_get(struct ieee80211_hw *hw,
  * the duration field, the low-level driver uses this function to receive
  * the duration field value in little-endian byteorder.
  */
-__le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
+__le16 ieee80211_rts_duration(struct ieee80211_hw *hw, int if_id,
 			      size_t frame_len,
 			      const struct ieee80211_tx_control *frame_txctl);
 
 /**
  * ieee80211_ctstoself_get - CTS-to-self frame generation function
  * @hw: pointer obtained from ieee80211_alloc_hw().
+ * @if_id: interface ID from &struct ieee80211_if_init_conf.
  * @frame: pointer to the frame that is going to be protected by the CTS-to-self.
  * @frame_len: the frame length (in octets).
  * @frame_txctl: &struct ieee80211_tx_control of the frame.
@@ -872,7 +888,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
  * the next CTS-to-self frame from the 802.11 code. The low-level is responsible
  * for calling this function before and CTS-to-self frame is needed.
  */
-void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
+void ieee80211_ctstoself_get(struct ieee80211_hw *hw, int if_id,
 			     const void *frame, size_t frame_len,
 			     const struct ieee80211_tx_control *frame_txctl,
 			     struct ieee80211_cts *cts);
@@ -880,6 +896,7 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
 /**
  * ieee80211_ctstoself_duration - Get the duration field for a CTS-to-self frame
  * @hw: pointer obtained from ieee80211_alloc_hw().
+ * @if_id: interface ID from &struct ieee80211_if_init_conf.
  * @frame_len: the length of the frame that is going to be protected by the CTS-to-self.
  * @frame_txctl: &struct ieee80211_tx_control of the frame.
  *
@@ -887,20 +904,21 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
  * the duration field, the low-level driver uses this function to receive
  * the duration field value in little-endian byteorder.
  */
-__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
+__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, int if_id,
 				    size_t frame_len,
 				    const struct ieee80211_tx_control *frame_txctl);
 
 /**
  * ieee80211_generic_frame_duration - Calculate the duration field for a frame
  * @hw: pointer obtained from ieee80211_alloc_hw().
+ * @if_id: interface ID from &struct ieee80211_if_init_conf.
  * @frame_len: the length of the frame.
  * @rate: the rate (in 100kbps) at which the frame is going to be transmitted.
  *
  * Calculate the duration field of some generic frame, given its
  * length and transmission rate (in 100kbps).
  */
-__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
+__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, int if_id,
 					size_t frame_len,
 					int rate);
 
net/mac80211/Makefile +5 -1
index a9c2d07..122b23e 100644
@@ -2,6 +2,7 @@ obj-$(CONFIG_MAC80211) += mac80211.o rc80211_simple.o
 
 mac80211-objs-$(CONFIG_MAC80211_LEDS) += ieee80211_led.o
 mac80211-objs-$(CONFIG_MAC80211_DEBUGFS) += debugfs.o debugfs_sta.o debugfs_netdev.o debugfs_key.o
+mac80211-objs-$(CONFIG_NET_SCHED) += wme.o
 
 mac80211-objs := \
 	ieee80211.o \
@@ -16,6 +17,9 @@ mac80211-objs := \
 	regdomain.o \
 	tkip.o \
 	aes_ccm.o \
-	wme.o \
 	ieee80211_cfg.o \
+	rx.o \
+	tx.o \
+	key.o \
+	util.o \
 	$(mac80211-objs-y)
net/mac80211/ieee80211.c +392 -4100

2,826 lines not on this page · raw message

net/mac80211/ieee80211_i.h +54 -20

74 lines not on this page · raw message

net/mac80211/ieee80211_iface.c +1 -1
index 8532a5c..6db6776 100644

Lines of this file are not shown. View the raw message.

net/mac80211/ieee80211_ioctl.c +12 -5
index e7904db..1fde214 100644

Lines of this file are not shown. View the raw message.

net/mac80211/ieee80211_rate.c +42 -0

42 lines not on this page · raw message

net/mac80211/ieee80211_rate.h +6 -0
index f021a02..cac91a9 100644

Lines of this file are not shown. View the raw message.

net/mac80211/ieee80211_sta.c +44 -16

60 lines not on this page · raw message

net/mac80211/key.c new file +69 -0

69 lines not on this page · raw message

net/mac80211/rx.c new file +1453 -0

1,453 lines not on this page · raw message

net/mac80211/sta_info.c +74 -110

184 lines not on this page · raw message

net/mac80211/sta_info.h +7 -4
index b5591d2..b5ef723 100644

Lines of this file are not shown. View the raw message.

net/mac80211/tx.c new file +1883 -0

1,883 lines not on this page · raw message

net/mac80211/util.c new file +488 -0

488 lines not on this page · raw message

net/mac80211/wme.c +0 -65

65 lines not on this page · raw message

net/mac80211/wme.h +4 -5
index f0bff10..76c713a 100644

Lines of this file are not shown. View the raw message.

net/wireless/wext.c +16 -14
index d6aaf65..debf519 100644

Lines of this file are not shown. View the raw message.

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

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

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

maintainer
#3 lore raw
In reply to John W. Linville

From: "John W. Linville" <[email protected]>
Date: Mon, 6 Aug 2007 16:13:21 -0400

Quoted 7 lines

The following changes since commit d4ac2477fad0f2680e84ec12e387ce67682c5c13:
Linus Torvalds (1):

        Linux 2.6.23-rc2

are available in the git repository at:

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

Pulled, thanks John.

maintainer
#2 lore raw

Re: Please pull 'upstream-davem' branch of wireless-2.6

In reply to John W. Linville

From: "John W. Linville" <[email protected]>
Date: Mon, 6 Aug 2007 17:01:31 -0400

Quoted 1 line

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

Pulled, thanks John.