Linux wireless drivers development
 help / color / mirror / Atom feed
* [RFT 8/8] staging: brcm80211: Remove proto/ethernet.h.
From: Jonas Gorski @ 2011-01-19 22:35 UTC (permalink / raw)
  To: linux-wireless
  Cc: Brett Rudley, Henry Ptasinski, Dowan Kim, Roland Vossen,
	Arend van Spriel
In-Reply-To: <1295476532-21130-8-git-send-email-jonas.gorski@gmail.com>

Since proto/ethernet.h now is empty except for one include, delete it and add
the single include where necessary.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 drivers/staging/brcm80211/brcmfmac/dhd_linux.c     |    1 -
 drivers/staging/brcm80211/brcmfmac/dhd_sdio.c      |    1 -
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c   |    1 -
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h   |    1 -
 drivers/staging/brcm80211/brcmfmac/wl_iw.c         |    1 -
 drivers/staging/brcm80211/brcmfmac/wl_iw.h         |    1 -
 drivers/staging/brcm80211/include/proto/802.11.h   |    2 +
 drivers/staging/brcm80211/include/proto/bcmevent.h |    2 +
 drivers/staging/brcm80211/include/proto/ethernet.h |   22 --------------------
 drivers/staging/brcm80211/include/proto/wpa.h      |    2 -
 drivers/staging/brcm80211/include/wlioctl.h        |    1 -
 drivers/staging/brcm80211/util/bcmsrom.c           |    2 -
 drivers/staging/brcm80211/util/bcmutils.c          |    1 -
 13 files changed, 4 insertions(+), 34 deletions(-)
 delete mode 100644 drivers/staging/brcm80211/include/proto/ethernet.h

diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
index 71c5203..cdeed33 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
@@ -36,7 +36,6 @@
 #include <bcmutils.h>
 #include <bcmendian.h>
 
-#include <proto/ethernet.h>
 #include <dngl_stats.h>
 #include <dhd.h>
 #include <dhd_bus.h>
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index 3edce44..383416d 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -44,7 +44,6 @@
 #include <sbsdpcmdev.h>
 #include <bcmsdpcm.h>
 
-#include <proto/ethernet.h>
 #include <proto/802.1d.h>
 #include <proto/802.11.h>
 
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
index c7e3837..f27524c 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
@@ -20,7 +20,6 @@
 
 #include <bcmutils.h>
 #include <bcmendian.h>
-#include <proto/ethernet.h>
 
 #include <asm/uaccess.h>
 
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
index 482691b..b4734d1 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
@@ -20,7 +20,6 @@
 #include <linux/wireless.h>
 #include <linux/wireless.h>
 #include <net/cfg80211.h>
-#include <proto/ethernet.h>
 #include <wlioctl.h>
 
 struct wl_conf;
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.c b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
index 346b190..85a2884 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
@@ -23,7 +23,6 @@
 
 #include <bcmutils.h>
 #include <bcmendian.h>
-#include <proto/ethernet.h>
 
 #include <linux/if_arp.h>
 #include <asm/uaccess.h>
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.h b/drivers/staging/brcm80211/brcmfmac/wl_iw.h
index c8637c5..ef5c72d 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_iw.h
+++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.h
@@ -19,7 +19,6 @@
 
 #include <linux/wireless.h>
 
-#include <proto/ethernet.h>
 #include <wlioctl.h>
 
 #define WL_SCAN_PARAMS_SSID_MAX	10
diff --git a/drivers/staging/brcm80211/include/proto/802.11.h b/drivers/staging/brcm80211/include/proto/802.11.h
index 11940fe..6bb1802 100644
--- a/drivers/staging/brcm80211/include/proto/802.11.h
+++ b/drivers/staging/brcm80211/include/proto/802.11.h
@@ -17,6 +17,8 @@
 #ifndef _802_11_H_
 #define _802_11_H_
 
+#include <linux/if_ether.h>
+
 #include <proto/wpa.h>
 #include <packed_section_start.h>
 
diff --git a/drivers/staging/brcm80211/include/proto/bcmevent.h b/drivers/staging/brcm80211/include/proto/bcmevent.h
index 5802ea0..68d30c9 100644
--- a/drivers/staging/brcm80211/include/proto/bcmevent.h
+++ b/drivers/staging/brcm80211/include/proto/bcmevent.h
@@ -17,6 +17,8 @@
 #ifndef _BCMEVENT_H_
 #define _BCMEVENT_H_
 
+#include <linux/if_ether.h>
+
 #include <packed_section_start.h>
 
 #define BCM_EVENT_MSG_VERSION		1
diff --git a/drivers/staging/brcm80211/include/proto/ethernet.h b/drivers/staging/brcm80211/include/proto/ethernet.h
deleted file mode 100644
index f52f430..0000000
--- a/drivers/staging/brcm80211/include/proto/ethernet.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2010 Broadcom Corporation
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _NET_ETHERNET_H_
-#define _NET_ETHERNET_H_
-
-#include <linux/if_ether.h>
-
-#endif				/* _NET_ETHERNET_H_ */
diff --git a/drivers/staging/brcm80211/include/proto/wpa.h b/drivers/staging/brcm80211/include/proto/wpa.h
index 10c2fb6..5ffcffd 100644
--- a/drivers/staging/brcm80211/include/proto/wpa.h
+++ b/drivers/staging/brcm80211/include/proto/wpa.h
@@ -17,8 +17,6 @@
 #ifndef _proto_wpa_h_
 #define _proto_wpa_h_
 
-#include <proto/ethernet.h>
-
 #define WPA2_PMKID_LEN	16
 #define RSN_CAP_1_REPLAY_CNTR		0
 #define RSN_CAP_2_REPLAY_CNTRS		1
diff --git a/drivers/staging/brcm80211/include/wlioctl.h b/drivers/staging/brcm80211/include/wlioctl.h
index 9b85f31..06989fa 100644
--- a/drivers/staging/brcm80211/include/wlioctl.h
+++ b/drivers/staging/brcm80211/include/wlioctl.h
@@ -17,7 +17,6 @@
 #ifndef _wlioctl_h_
 #define	_wlioctl_h_
 
-#include <proto/ethernet.h>
 #ifdef BRCM_FULLMAC
 #include <proto/bcmeth.h>
 #endif
diff --git a/drivers/staging/brcm80211/util/bcmsrom.c b/drivers/staging/brcm80211/util/bcmsrom.c
index 79038e0..fa696ee 100644
--- a/drivers/staging/brcm80211/util/bcmsrom.c
+++ b/drivers/staging/brcm80211/util/bcmsrom.c
@@ -44,8 +44,6 @@
 #include <sbsdpcmdev.h>
 #endif
 
-#include <proto/ethernet.h>	/* for sprom content groking */
-
 #define	BS_ERROR(args)
 
 #define SROM_OFFSET(sih) ((sih->ccrev > 31) ? \
diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c
index caab133..258fd90 100644
--- a/drivers/staging/brcm80211/util/bcmutils.c
+++ b/drivers/staging/brcm80211/util/bcmutils.c
@@ -28,7 +28,6 @@
 #include <bcmnvram.h>
 #include <bcmendian.h>
 #include <bcmdevs.h>
-#include <proto/ethernet.h>
 #include <proto/802.1d.h>
 #include <proto/802.11.h>
 
-- 
1.5.6.5


^ permalink raw reply related

* [RFT 6/8] staging: brcm80211: Remove static ether_bcast.
From: Jonas Gorski @ 2011-01-19 22:35 UTC (permalink / raw)
  To: linux-wireless
  Cc: Brett Rudley, Henry Ptasinski, Dowan Kim, Roland Vossen,
	Arend van Spriel
In-Reply-To: <1295476532-21130-6-git-send-email-jonas.gorski@gmail.com>

Remove the static struct ether_bcast and use memset for setting the broadcast
address instead of copying the struct.
_

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c   |    4 ++--
 drivers/staging/brcm80211/brcmfmac/wl_iw.c         |    4 ++--
 drivers/staging/brcm80211/include/proto/ethernet.h |    2 --
 drivers/staging/brcm80211/sys/wlc_mac80211.c       |    3 +--
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
index 991463f..c7e3837 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
@@ -648,7 +648,7 @@ wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
 
 static void wl_iscan_prep(struct wl_scan_params *params, struct wlc_ssid *ssid)
 {
-	memcpy(&params->bssid, &ether_bcast, ETH_ALEN);
+	memset(&params->bssid, 0xff, ETH_ALEN);
 	params->bss_type = DOT11_BSSTYPE_ANY;
 	params->scan_type = 0;
 	params->nprobes = -1;
@@ -1373,7 +1373,7 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
 	memcpy(&join_params.ssid.SSID, sme->ssid, join_params.ssid.SSID_len);
 	join_params.ssid.SSID_len = htod32(join_params.ssid.SSID_len);
 	wl_update_prof(wl, NULL, &join_params.ssid, WL_PROF_SSID);
-	memcpy(&join_params.params.bssid, &ether_bcast, ETH_ALEN);
+	memset(&join_params.params.bssid, 0xff, ETH_ALEN);
 
 	wl_ch_to_chanspec(wl->channel, &join_params, &join_params_size);
 	WL_DBG("join_param_size %d\n", join_params_size);
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.c b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
index db6e68e..346b190 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
@@ -1015,7 +1015,7 @@ static int wl_iw_iscan_prep(wl_scan_params_t *params, wlc_ssid_t *ssid)
 {
 	int err = 0;
 
-	memcpy(&params->bssid, &ether_bcast, ETH_ALEN);
+	memset(&params->bssid, 0xff, ETH_ALEN);
 	params->bss_type = DOT11_BSSTYPE_ANY;
 	params->scan_type = 0;
 	params->nprobes = -1;
@@ -1919,7 +1919,7 @@ wl_iw_set_essid(struct net_device *dev,
 
 	memcpy(&join_params.ssid.SSID, g_ssid.SSID, g_ssid.SSID_len);
 	join_params.ssid.SSID_len = htod32(g_ssid.SSID_len);
-	memcpy(&join_params.params.bssid, &ether_bcast, ETH_ALEN);
+	memset(&join_params.params.bssid, 0xff, ETH_ALEN);
 
 	wl_iw_ch_to_chanspec(g_wl_iw_params.target_channel, &join_params,
 			     &join_params_size);
diff --git a/drivers/staging/brcm80211/include/proto/ethernet.h b/drivers/staging/brcm80211/include/proto/ethernet.h
index 77deb94..b401fda 100644
--- a/drivers/staging/brcm80211/include/proto/ethernet.h
+++ b/drivers/staging/brcm80211/include/proto/ethernet.h
@@ -25,8 +25,6 @@ BWL_PRE_PACKED_STRUCT struct ether_addr {
 	u8 octet[ETH_ALEN];
 } BWL_POST_PACKED_STRUCT;
 
-static const struct ether_addr ether_bcast = { {255, 255, 255, 255, 255, 255} };
-
 #include <packed_section_end.h>
 
 #endif				/* _NET_ETHERNET_H_ */
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c
index 9c57573..0bf70fc 100644
--- a/drivers/staging/brcm80211/sys/wlc_mac80211.c
+++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c
@@ -7658,8 +7658,7 @@ wlc_bcn_prb_template(struct wlc_info *wlc, uint type, ratespec_t bcn_rspec,
 	/* DUR is 0 for multicast bcn, or filled in by MAC for prb resp */
 	/* A1 filled in by MAC for prb resp, broadcast for bcn */
 	if (type == FC_BEACON)
-		bcopy((const char *)&ether_bcast, (char *)&h->da,
-		      ETH_ALEN);
+		memset(&h->da, 0xff, ETH_ALEN);
 	bcopy((char *)&cfg->cur_etheraddr, (char *)&h->sa, ETH_ALEN);
 	bcopy((char *)&cfg->BSSID, (char *)&h->bssid, ETH_ALEN);
 
-- 
1.5.6.5


^ permalink raw reply related

* [RFT 1/8] staging: brcm80211: Remove unused ETHER_<foo> macros.
From: Jonas Gorski @ 2011-01-19 22:35 UTC (permalink / raw)
  To: linux-wireless
  Cc: Brett Rudley, Henry Ptasinski, Dowan Kim, Roland Vossen,
	Arend van Spriel
In-Reply-To: <1295476532-21130-1-git-send-email-jonas.gorski@gmail.com>

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 drivers/staging/brcm80211/include/proto/ethernet.h |   21 --------------------
 1 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/brcm80211/include/proto/ethernet.h b/drivers/staging/brcm80211/include/proto/ethernet.h
index 567407d..106a8bf 100644
--- a/drivers/staging/brcm80211/include/proto/ethernet.h
+++ b/drivers/staging/brcm80211/include/proto/ethernet.h
@@ -34,18 +34,6 @@
 #define ETHER_SRC_OFFSET	(1 * ETH_ALEN)
 #define ETHER_TYPE_OFFSET	(2 * ETH_ALEN)
 
-#define	ETHER_IS_VALID_LEN(foo)	\
-	((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
-
-#define ETHER_FILL_MCAST_ADDR_FROM_IP(ea, mgrp_ip) {		\
-		((u8 *)ea)[0] = 0x01;			\
-		((u8 *)ea)[1] = 0x00;			\
-		((u8 *)ea)[2] = 0x5e;			\
-		((u8 *)ea)[3] = ((mgrp_ip) >> 16) & 0x7f;	\
-		((u8 *)ea)[4] = ((mgrp_ip) >>  8) & 0xff;	\
-		((u8 *)ea)[5] = ((mgrp_ip) >>  0) & 0xff;	\
-}
-
 BWL_PRE_PACKED_STRUCT struct ether_header {
 	u8 ether_dhost[ETH_ALEN];
 	u8 ether_shost[ETH_ALEN];
@@ -56,17 +44,8 @@ BWL_PRE_PACKED_STRUCT struct ether_addr {
 	u8 octet[ETH_ALEN];
 } BWL_POST_PACKED_STRUCT;
 
-#define ETHER_SET_UNICAST(ea)	(((u8 *)(ea))[0] = (((u8 *)(ea))[0] & ~1))
-
 static const struct ether_addr ether_bcast = { {255, 255, 255, 255, 255, 255} };
 
-#define ETHER_MOVE_HDR(d, s) \
-do { \
-	struct ether_header t; \
-	t = *(struct ether_header *)(s); \
-	*(struct ether_header *)(d) = t; \
-} while (0)
-
 #include <packed_section_end.h>
 
 #endif				/* _NET_ETHERNET_H_ */
-- 
1.5.6.5


^ permalink raw reply related

* [RFT 2/8] staging: brcm80211: Use linux ethhdr struct.
From: Jonas Gorski @ 2011-01-19 22:35 UTC (permalink / raw)
  To: linux-wireless
  Cc: Brett Rudley, Henry Ptasinski, Dowan Kim, Roland Vossen,
	Arend van Spriel
In-Reply-To: <1295476532-21130-2-git-send-email-jonas.gorski@gmail.com>

Use the linux ethhdr struct instead of defining one itself.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 drivers/staging/brcm80211/brcmfmac/dhd_linux.c     |   16 ++++++++--------
 drivers/staging/brcm80211/include/proto/bcmevent.h |    4 ++--
 drivers/staging/brcm80211/include/proto/ethernet.h |    6 ------
 drivers/staging/brcm80211/sys/wlc_mac80211.c       |    2 +-
 4 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
index db45083..87bf42d 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
@@ -1030,11 +1030,11 @@ int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf)
 	/* Update multicast statistic */
 	if (pktbuf->len >= ETH_ALEN) {
 		u8 *pktdata = (u8 *) (pktbuf->data);
-		struct ether_header *eh = (struct ether_header *)pktdata;
+		struct ethhdr *eh = (struct ethhdr *)pktdata;
 
-		if (is_multicast_ether_addr(eh->ether_dhost))
+		if (is_multicast_ether_addr(eh->h_dest))
 			dhdp->tx_multicast++;
-		if (ntoh16(eh->ether_type) == ETH_P_PAE)
+		if (eh->h_proto == htons(ETH_P_PAE))
 			atomic_inc(&dhd->pend_8021x_cnt);
 	}
 
@@ -1254,15 +1254,15 @@ void dhd_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp, bool success)
 {
 	uint ifidx;
 	dhd_info_t *dhd = (dhd_info_t *) (dhdp->info);
-	struct ether_header *eh;
-	u16 type;
+	struct ethhdr *eh;
+	__be16 type;
 
 	dhd_prot_hdrpull(dhdp, &ifidx, txp);
 
-	eh = (struct ether_header *)(txp->data);
-	type = ntoh16(eh->ether_type);
+	eh = (struct ethhdr *)(txp->data);
+	type = eh->h_proto;
 
-	if (type == ETH_P_PAE)
+	if (type == htons(ETH_P_PAE))
 		atomic_dec(&dhd->pend_8021x_cnt);
 
 }
diff --git a/drivers/staging/brcm80211/include/proto/bcmevent.h b/drivers/staging/brcm80211/include/proto/bcmevent.h
index 865d157..f61c048 100644
--- a/drivers/staging/brcm80211/include/proto/bcmevent.h
+++ b/drivers/staging/brcm80211/include/proto/bcmevent.h
@@ -40,13 +40,13 @@ typedef BWL_PRE_PACKED_STRUCT struct {
 
 #ifdef BRCM_FULLMAC
 typedef BWL_PRE_PACKED_STRUCT struct bcm_event {
-	struct ether_header eth;
+	struct ethhdr eth;
 	bcmeth_hdr_t		bcm_hdr;
 	wl_event_msg_t		event;
 } BWL_POST_PACKED_STRUCT bcm_event_t;
 #endif
 #define BCM_MSG_LEN	(sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - \
-	sizeof(struct ether_header))
+	sizeof(struct ethhdr))
 
 #define WLC_E_SET_SSID		0
 #define WLC_E_JOIN		1
diff --git a/drivers/staging/brcm80211/include/proto/ethernet.h b/drivers/staging/brcm80211/include/proto/ethernet.h
index 106a8bf..af3b977 100644
--- a/drivers/staging/brcm80211/include/proto/ethernet.h
+++ b/drivers/staging/brcm80211/include/proto/ethernet.h
@@ -34,12 +34,6 @@
 #define ETHER_SRC_OFFSET	(1 * ETH_ALEN)
 #define ETHER_TYPE_OFFSET	(2 * ETH_ALEN)
 
-BWL_PRE_PACKED_STRUCT struct ether_header {
-	u8 ether_dhost[ETH_ALEN];
-	u8 ether_shost[ETH_ALEN];
-	u16 ether_type;
-} BWL_POST_PACKED_STRUCT;
-
 BWL_PRE_PACKED_STRUCT struct ether_addr {
 	u8 octet[ETH_ALEN];
 } BWL_POST_PACKED_STRUCT;
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c
index 1d5d01a..9c57573 100644
--- a/drivers/staging/brcm80211/sys/wlc_mac80211.c
+++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c
@@ -1729,7 +1729,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
 
 	/* some code depends on packed structures */
 	ASSERT(sizeof(struct ether_addr) == ETH_ALEN);
-	ASSERT(sizeof(struct ether_header) == ETH_HLEN);
+	ASSERT(sizeof(struct ethhdr) == ETH_HLEN);
 	ASSERT(sizeof(d11regs_t) == SI_CORE_SIZE);
 	ASSERT(sizeof(ofdm_phy_hdr_t) == D11_PHY_HDR_LEN);
 	ASSERT(sizeof(cck_phy_hdr_t) == D11_PHY_HDR_LEN);
-- 
1.5.6.5


^ permalink raw reply related

* Re: wireless-testing rebased on 2.6.38-rc1
From: John W. Linville @ 2011-01-19 22:23 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless
In-Reply-To: <4D376309.9020300@candelatech.com>

On Wed, Jan 19, 2011 at 02:17:45PM -0800, Ben Greear wrote:
> On 01/19/2011 10:22 AM, John W. Linville wrote:
> >The wireless-testing tree has been rebased upon 2.6.38-rc1.
> >Please updates your trees accordingly.
> 
> Did you remove the 'wl' from the kernel name on purpose?
> 
> (Or did I screw that up locally somehow?)

Arg...no...

I'll fix it...

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: wireless-testing rebased on 2.6.38-rc1
From: Ben Greear @ 2011-01-19 22:17 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless
In-Reply-To: <20110119182236.GA2370@tuxdriver.com>

On 01/19/2011 10:22 AM, John W. Linville wrote:
> The wireless-testing tree has been rebased upon 2.6.38-rc1.
> Please updates your trees accordingly.

Did you remove the 'wl' from the kernel name on purpose?

(Or did I screw that up locally somehow?)

Thanks,
Ben

>
> Thanks,
>
> John


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply

* Re: [RFC PATCH 10/17] zd1211rw: implement beacon fetching and handling ieee80211_get_buffered_bc()
From: Christian Lamparter @ 2011-01-19 20:22 UTC (permalink / raw)
  To: Jussi Kivilinna; +Cc: linux-wireless, Daniel Drake, Ulrich Kunitz, kvalo
In-Reply-To: <20110119204903.179429gv9mcqcidc@hayate.sektori.org>

On Wednesday 19 January 2011 19:49:03 Jussi Kivilinna wrote:
> Quoting Christian Lamparter <chunkeey@googlemail.com>:
>> On Sunday 09 January 2011 16:46:56 Jussi Kivilinna wrote:
>>> Quoting Christian Lamparter <chunkeey@googlemail.com>:
>>>> this is an interesting one...
>>>>
>>>> Since zd_beacon_done also uploads the next beacon so long in advance,
>>>> there could be an equally long race between the outdated state of the
>>>> next beacon's DTIM broadcast traffic indicator (802.11-2007 7.3.2.6)
>>>> which -in your case- was uploaded almost a beacon interval ago and
>>>> the xmit of ieee80211_get_buffered_bc *now*.
>>>>
>>>> The dtim bc/mc bit might be not set, when a mc/bc arrived after the
>>>> beacon was uploaded, but before the "beacon done event" from the
>>>> hardware. So, dozing stations don't expect the broadcast traffic
>>>> and of course, they might miss it completely.
>>>>
>>>> It's probably better to fix this in mac80211 (see the attached hack).
>>>
>>> Ok, should I add this to my patchset?
>> well, difficult to say. As far as I can say, it should be correct for "your
>> case". But, on the other hand: what about solutions that can't buffer
>> mc/bc frames (and needs to call ieee80211_get_buffered_bc), however the
>> firmware is clever enough to maintain a beacon internally (so they
>> won't call ieee80211_beacon_get and only relies on set_tim)?
>>
>> Sure, it's just a unlikely corner case... In fact, I didn't check if
>> that's even possible, but it does sound reasonable to some extend.
>
> From what I checked none of currect driver/device is such.
> Maybe if such device appears then !bss->dtim_bc_mc check in  
> ieee80211_beacon_add_tim() could be masked with driver flag (something  
> like
> IEEE80211_HW_CAN_AND_HANDLE_BEACON_BUT_STILL_NEEDS_HOST_BROADCAST_PS_BUFFERING).

True, but a recent discussion into this matter have made parts of the
API you are planning to use sort-of "deprecated"? [I think?]

http://marc.info/?l=linux-wireless&m=129463297300480

I don't know the exact details, but I'm sure Kvalo does have his reasons.
[afaik it has to do with wl12xx, he even explained it once, but I can't
find that mail anymore].

>>>> In fact, you could just as well drop "[09/17] zd1211rw: implement
>>>> seq_num for IEEE80211_TX_CTL_ASSIGN_SEQ"... unless of course, I'm
>>>> an idiot and there is a really clever way around these issues.
>>>
>>> Oh well, I should have checked this more closely before doing that
>>> patch. HW is assigning seq-numbers already and that patch is not needed.
>>
>> heh, p54's fw can assign sequence numbers as well, but there's a txdesc flag
>> to control the counter, so the firmware does not mess with the  
>> sequence control
>> of QoS-Data frames. I hope zd1211* has one too.
> 
> There is tx-control flag that doesn't have effect, but since zd1211  
> doesn't appear to support QoS it's not a problem.

Ok, that sound reasonable.

One more thing, is there a tx-control flag to instruct the HW/FW to write
the TSF into probe response frames, just like it does for beacons frames?

Sure, this feature is far more important for IBSS, but the 802.11-2007
specs @11.1.4 says that a STA might use beacons or probe responses to
synchronize its timers. [However 11.1.1.1 and 11.1.3.4 say that STAs
should "only" pick this information from beacons, if I'm not mistaken?!]
(Also a uniform "0..0" timestamp in every probe-response looks so sad.)

Best Regards,
	Christian

^ permalink raw reply

* Re: Does linux wireless support TL-WN861N
From: Brian Prodoehl @ 2011-01-19 20:06 UTC (permalink / raw)
  To: JD; +Cc: Rafał Miłecki, linux-wireless, ath9k-devel
In-Reply-To: <4D35ECD8.8070000@gmail.com>

2011/1/18 JD <jd1008@gmail.com>:
> On 01/18/2011 11:23 AM, Rafał Miłecki wrote:
>>
>> 2011/1/18 JD<jd1008@gmail.com>:
>>>
>>> TP-Link TL-WN861N
>>> see
>>>
>>> http://www.tp-link.com/products/productDetails.asp?class=&content=spe&pmodel=TL-WN861N
>>
>> https://forum.openwrt.org/viewtopic.php?id=25431
>> http://www.wikidevi.com/wiki/TP-LINK_TL-WN861N_v2
>>
>> Both sources tell about AR9223 chipset, but I is not mentioned on
>> http://wireless.kernel.org/en/users/Drivers/ath9k
>>
>> Maybe someone from ath9k ML knows it? Or try to Google it.
>>
> Thanx Rafal.
> I did find it listed on
>
> http://wireless.kernel.org/en/users/Drivers/ath9k/products/external?highlight=%28TL-WN861N%29
>
> However, I also found out that it has very very poor Rx sensitivity (only
> -68 dBm) at 11g,
> and much much less at 11N. My location relative to AP is very bad. I need a
> card supported
> by ath9k and with Rx sensitivity that can go all the way to -97dBm.
>
> Cheers,
>
> JD

That sensitivity number is the sensitivity at the 54Mbps bitrate.  If
you're comparing product briefs or datasheets, make sure you're
comparing numbers for the same bitrate.  That card can receive 1Mbps
down to -90dBm, and 6Mbps down to -88dBm.  You'll find cards with
sensitivity 6 or 7dB better, but that's about it.

-Brian

^ permalink raw reply

* Compat-wireless release for 2011-01-19 is baked
From: Compat-wireless cronjob account @ 2011-01-19 20:05 UTC (permalink / raw)
  To: linux-wireless

>From git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next
   8ffd020..143a29f  history    -> origin/history
 + a4e85a5...a3d484f master     -> origin/master  (forced update)
   9e8a462..c56eb8f  stable     -> origin/stable
 * [new tag]         next-20110119 -> next-20110119
 * [new tag]         v2.6.38-rc1 -> v2.6.38-rc1

compat-wireless code metrics

    782530 - Total upstream lines of code being pulled
      2103 - backport code changes
      1843 - backport code additions
       260 - backport code deletions
      7279 - backport from compat module
      9382 - total backport code
    1.1989 - % of code consists of backport work
      1531 - Crap changes not yet posted
      1488 - Crap additions not yet posted
        43 - Crap deletions not yet posted
    0.1956 - % of crap code

Base tree: linux-next.git
Base tree version: next-20110119
compat-wireless release: compat-wireless-2011-01-06-3-g8db1608-pc

^ permalink raw reply

* pull request: bluetooth-2.6 2011-01-19
From: Gustavo F. Padovan @ 2011-01-19 19:27 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, linux-bluetooth

Hi John,

Here is the first set of Bluetooth fixes for 2.6.38. It includes a patch from
Alexander Holler to reduce memory usage by the ath3k bluetooth driver. A
misusu of logical operation in L2CAP by David Sterba. There is also a fix to a
RFCOMM crash by Lukáš Turek.

Last we have six patches from Johan Hedberg, the first fix a leak in the
HCI blacklist feature. The other 5 patches, are fixes created against the BITE
tester (used in the Bluetooth qualification process). All of them are very
simple. Worth to note that one of them is a revert and "Bluetooth: Create a
unified auth_type evaluation function" is a very simple refactoring. These
patches makes 2.6.38 ready for the Bluetooth qualification process.

Please merge, or let me know any doubts or problems you find. Thanks.


The following changes since commit 38d59392b29437af3a702209b6a5196ef01f79a8:

  iwlwifi: fix valid chain reading from EEPROM (2011-01-18 15:10:31 -0500)

are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-2.6.git master

Alexander Holler (1):
      Bluetooth: ath3k: reduce memory usage

David Sterba (1):
      Bluetooth: l2cap: fix misuse of logical operation in place of bitop

Johan Hedberg (6):
      Bluetooth: Fix leaking blacklist when unregistering a hci device
      Revert "Bluetooth: Update sec_level/auth_type for already existing connections"
      Bluetooth: Fix MITM protection requirement preservation
      Bluetooth: Create a unified auth_type evaluation function
      Bluetooth: Fix authentication request for L2CAP raw sockets
      Bluetooth: Fix race condition with conn->sec_level

Lukáš Turek (1):
      Bluetooth: Never deallocate a session when some DLC points to it

 drivers/bluetooth/ath3k.c        |   75 +++++++++-------------------------
 include/net/bluetooth/hci_core.h |    1 +
 net/bluetooth/hci_conn.c         |   16 ++++---
 net/bluetooth/hci_core.c         |    4 ++
 net/bluetooth/hci_event.c        |    9 ++--
 net/bluetooth/l2cap.c            |   84 ++++++++++++++-----------------------
 net/bluetooth/rfcomm/core.c      |    3 +-
 7 files changed, 73 insertions(+), 119 deletions(-)

-- 
Gustavo F. Padovan
http://profusion.mobi

^ permalink raw reply

* Re: [PATCH 2/2] ath9k: Fix power save usage count imbalance on deinit
From: Luis R. Rodriguez @ 2011-01-19 19:24 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linux-wireless, stable
In-Reply-To: <1295452063-13828-2-git-send-email-rmanoharan@atheros.com>

On Wed, Jan 19, 2011 at 7:47 AM, Rajkumar Manoharan
<rmanoharan@atheros.com> wrote:
> Upon unloading the driver, the ps_usecount is incremented
> before configuring gpio registers in deinit_device.
> But it is failed to restore the ps_usecount after that.
> The problem is that the chip is moved to FULL SLEEP
> by radio_disable when mac80211 is reporting as idle
> though ps_usecount is not zero.
>
> This patch retores ps_usecount properly and ensures that
> the chip is always moved to full sleep only if ps usage
> counte is zero which helps in debugging. And also fixes
> the following warning.
>
> ath: DMA failed to stop in 10 ms AR_CR=0xdeadbeef AR_DIAG_SW=0xdeadbeef
> ath: Could not stop RX, we could be confusing the DMA engine when we
> start RX up
> ------------[ cut here ]------------
> WARNING: at drivers/net/wireless/ath/ath9k/recv.c:536
> ath_stoprecv+0xf4/0x100 [ath9k]()
>
> Cc: stable@kernel.org
> Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
> ---
>  drivers/net/wireless/ath/ath9k/init.c |    2 ++
>  drivers/net/wireless/ath/ath9k/main.c |    2 --
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
> index 767d8b8..b38c874 100644
> --- a/drivers/net/wireless/ath/ath9k/init.c
> +++ b/drivers/net/wireless/ath/ath9k/init.c
> @@ -824,6 +824,8 @@ void ath9k_deinit_device(struct ath_softc *sc)
>        wiphy_rfkill_stop_polling(sc->hw->wiphy);
>        ath_deinit_leds(sc);
>
> +       ath9k_ps_restore(sc);
> +
>        for (i = 0; i < sc->num_sec_wiphy; i++) {
>                struct ath_wiphy *aphy = sc->sec_wiphy[i];
>                if (aphy == NULL)
> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> index c03184e..aff1c72 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -966,8 +966,6 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw)
>
>        spin_unlock_bh(&sc->sc_pcu_lock);
>        ath9k_ps_restore(sc);
> -
> -       ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP);

Are you sure this hunk does not regress the suspend/resume case when
using the new dbus API?

  Luis

^ permalink raw reply

* Re: [RFC PATCH 10/17] zd1211rw: implement beacon fetching and handling ieee80211_get_buffered_bc()
From: Jussi Kivilinna @ 2011-01-19 18:49 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: linux-wireless, Daniel Drake, Ulrich Kunitz
In-Reply-To: <201101092133.37610.chunkeey@googlemail.com>

Quoting Christian Lamparter <chunkeey@googlemail.com>:

> On Sunday 09 January 2011 16:46:56 Jussi Kivilinna wrote:
>> Quoting Christian Lamparter <chunkeey@googlemail.com>:
>> > On Wednesday 05 January 2011 00:49:10 Jussi Kivilinna wrote:
>> >> diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c
>> >> b/drivers/net/wireless/zd1211rw/zd_mac.c
>> >> index aace010..a3c7e8f 100644
>> >> --- a/drivers/net/wireless/zd1211rw/zd_mac.c
>> >> +++ b/drivers/net/wireless/zd1211rw/zd_mac.c
>> >> @@ -958,16 +958,46 @@ static int zd_op_config(struct ieee80211_hw
>> >> *hw, u32 changed)
>> >>  	return zd_chip_set_channel(&mac->chip, conf->channel->hw_value);
>> >>  }
>> >>
>> >> +static void zd_beacon_done(struct zd_mac *mac)
>> >> +{
>> >
>> > this is an interesting one...
>> >
>> > Since zd_beacon_done also uploads the next beacon so long in advance,
>> > there could be an equally long race between the outdated state of the
>> > next beacon's DTIM broadcast traffic indicator (802.11-2007 7.3.2.6)
>> > which -in your case- was uploaded almost a beacon interval ago and
>> > the xmit of ieee80211_get_buffered_bc *now*.
>> >
>> > The dtim bc/mc bit might be not set, when a mc/bc arrived after the
>> > beacon was uploaded, but before the "beacon done event" from the
>> > hardware. So, dozing stations don't expect the broadcast traffic
>> > and of course, they might miss it completely.
>> >
>> > It's probably better to fix this in mac80211 (see the attached hack).
>>
>> Ok, should I add this to my patchset?
> well, difficult to say. As far as I can say, it should be correct for "your
> case". But, on the other hand: what about solutions that can't buffer
> mc/bc frames (and needs to call ieee80211_get_buffered_bc), however the
> firmware is clever enough to maintain a beacon internally (so they
> won't call ieee80211_beacon_get and only relies on set_tim)?
>
> Sure, it's just a unlikely corner case... In fact, I didn't check if
> that's even possible, but it does sound reasonable to some extend.
>

 From what I checked none of currect driver/device is such. Maybe if  
such device appears then !bss->dtim_bc_mc check in  
ieee80211_beacon_add_tim() could be masked with driver flag (something  
like  
IEEE80211_HW_CAN_AND_HANDLE_BEACON_BUT_STILL_NEEDS_HOST_BROADCAST_PS_BUFFERING).

>> > In fact, you could just as well drop "[09/17] zd1211rw: implement
>> > seq_num for IEEE80211_TX_CTL_ASSIGN_SEQ"... unless of course, I'm
>> > an idiot and there is a really clever way around these issues.
>>
>> Oh well, I should have checked this more closely before doing that
>> patch. HW is assigning seq-numbers already and that patch is not needed.
>
> heh, p54's fw can assign sequence numbers as well, but there's a txdesc flag
> to control the counter, so the firmware does not mess with the  
> sequence control
> of QoS-Data frames. I hope zd1211* has one too.
>

There is tx-control flag that doesn't have effect, but since zd1211  
doesn't appear to support QoS it's not a problem.

-Jussi


^ permalink raw reply

* wireless-testing rebased on 2.6.38-rc1
From: John W. Linville @ 2011-01-19 18:22 UTC (permalink / raw)
  To: linux-wireless

The wireless-testing tree has been rebased upon 2.6.38-rc1.
Please updates your trees accordingly.

Thanks,

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: [PATCH 0/8] ath5k 802.11j preparation and cleanup
From: Nick Kossifidis @ 2011-01-19 15:58 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119091949.19628.28309.stgit@localhost6.localdomain6>

2011/1/19 Bruno Randolf <br1@einfach.org>:
> This series prepares ath5k for 802.11j (4.9GHz) support but most of the patches
> are just cleaning up things i found in the process. 802.11j is still not
> enabled.
>
> bruno
>
> ---
>
> Bruno Randolf (8):
>      ath5k: Use mac80211 channel mapping function
>      ath5k: Simplify loop when setting up channels
>      ath5k: Rename ath5k_copy_channels
>      ath5k: ath5k_setup_channels cleanup and whitespace
>      ath5k: Add 802.11j 4.9GHz channels to allowed channels
>      ath5: Remove unused CTL definitions
>      ath5k: Remove unused sc->curmode
>      ath5k: Remove redundant sc->curband
>
>
>  drivers/net/wireless/ath/ath5k/base.c   |   95 +++++++++++--------------------
>  drivers/net/wireless/ath/ath5k/base.h   |    3 -
>  drivers/net/wireless/ath/ath5k/eeprom.h |   23 --------
>  3 files changed, 34 insertions(+), 87 deletions(-)
>
> --
> Signature

Nice clean up !


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply

* Re: [PATCH 4/8] ath5k: ath5k_setup_channels cleanup and whitespace
From: Nick Kossifidis @ 2011-01-19 15:57 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092052.19628.61933.stgit@localhost6.localdomain6>

2011/1/19 Bruno Randolf <br1@einfach.org>:
> Remove useless test_bit - it's not going to happen because of the way this
> function is called only when that bit is set.
>
> And fix some whitespace.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>  drivers/net/wireless/ath/ath5k/base.c |   11 +++--------
>  1 files changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index 9e8b1f4..a28ad58 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -256,21 +256,16 @@ static bool ath5k_is_standard_channel(short chan)
>  }
>
>  static unsigned int
> -ath5k_setup_channels(struct ath5k_hw *ah,
> -               struct ieee80211_channel *channels,
> -               unsigned int mode,
> -               unsigned int max)
> +ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels,
> +               unsigned int mode, unsigned int max)
>  {
>        unsigned int count, size, chfreq, freq, ch;
>        enum ieee80211_band band;
>
> -       if (!test_bit(mode, ah->ah_modes))
> -               return 0;
> -
>        switch (mode) {
>        case AR5K_MODE_11A:
>                /* 1..220, but 2GHz frequencies are filtered by check_channel */
> -               size = 220 ;
> +               size = 220;
>                chfreq = CHANNEL_5GHZ;
>                band = IEEE80211_BAND_5GHZ;
>                break;
>


Acked-by: Nick Kossifidis <mickflemm@gmail.com>


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply

* Re: [PATCH 8/8] ath5k: Remove redundant sc->curband
From: Nick Kossifidis @ 2011-01-19 15:57 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092113.19628.33322.stgit@localhost6.localdomain6>

2011/1/19 Bruno Randolf <br1@einfach.org>:
> Remove sc->curband because the band is already stored in the current channel.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>  drivers/net/wireless/ath/ath5k/base.c |   11 ++++-------
>  drivers/net/wireless/ath/ath5k/base.h |    2 --
>  2 files changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index a00cc11..0e39ee8 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -551,7 +551,7 @@ ath5k_hw_to_driver_rix(struct ath5k_softc *sc, int hw_rix)
>                        "hw_rix out of bounds: %x\n", hw_rix))
>                return 0;
>
> -       rix = sc->rate_idx[sc->curband->band][hw_rix];
> +       rix = sc->rate_idx[sc->curchan->band][hw_rix];
>        if (WARN(rix < 0, "invalid hw_rix: %x\n", hw_rix))
>                rix = 0;
>
> @@ -1361,7 +1361,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb,
>        rxs->flag |= RX_FLAG_TSFT;
>
>        rxs->freq = sc->curchan->center_freq;
> -       rxs->band = sc->curband->band;
> +       rxs->band = sc->curchan->band;
>
>        rxs->signal = sc->ah->ah_noise_floor + rs->rs_rssi;
>
> @@ -1376,7 +1376,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb,
>        rxs->flag |= ath5k_rx_decrypted(sc, skb, rs);
>
>        if (rxs->rate_idx >= 0 && rs->rs_rate ==
> -           sc->curband->bitrates[rxs->rate_idx].hw_value_short)
> +           sc->sbands[sc->curchan->band].bitrates[rxs->rate_idx].hw_value_short)
>                rxs->flag |= RX_FLAG_SHORTPRE;
>
>        ath5k_debug_dump_skb(sc, skb, "RX  ", 0);
> @@ -2536,7 +2536,6 @@ ath5k_init_hw(struct ath5k_softc *sc)
>         * and then setup of the interrupt mask.
>         */
>        sc->curchan = sc->hw->conf.channel;
> -       sc->curband = &sc->sbands[sc->curchan->band];
>        sc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL |
>                AR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL |
>                AR5K_INT_FATAL | AR5K_INT_GLOBAL | AR5K_INT_MIB;
> @@ -2663,10 +2662,8 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
>         * so we should also free any remaining
>         * tx buffers */
>        ath5k_drain_tx_buffs(sc);
> -       if (chan) {
> +       if (chan)
>                sc->curchan = chan;
> -               sc->curband = &sc->sbands[chan->band];
> -       }
>        ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL,
>                                                                skip_pcu);
>        if (ret) {
> diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
> index 58660e4..8f919dc 100644
> --- a/drivers/net/wireless/ath/ath5k/base.h
> +++ b/drivers/net/wireless/ath/ath5k/base.h
> @@ -183,8 +183,6 @@ struct ath5k_softc {
>        enum nl80211_iftype     opmode;
>        struct ath5k_hw         *ah;            /* Atheros HW */
>
> -       struct ieee80211_supported_band         *curband;
> -
>  #ifdef CONFIG_ATH5K_DEBUG
>        struct ath5k_dbg_info   debug;          /* debug info */
>  #endif /* CONFIG_ATH5K_DEBUG */
>


Acked-by: Nick Kossifidis <mickflemm@gmail.com>


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply

* Re: [PATCH 7/8] ath5k: Remove unused sc->curmode
From: Nick Kossifidis @ 2011-01-19 15:56 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092108.19628.43971.stgit@localhost6.localdomain6>

2011/1/19 Bruno Randolf <br1@einfach.org>:
> sc->curmode is set but never used. Remove it and the helper function. Also the
> ath5k_rate_update which is refered to in the comment does not exist (any more?)
> so we don't need to setup the band in that place.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>  drivers/net/wireless/ath/ath5k/base.c |   18 ------------------
>  drivers/net/wireless/ath/ath5k/base.h |    1 -
>  2 files changed, 0 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index 6900543..a00cc11 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -439,18 +439,6 @@ ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan)
>        return ath5k_reset(sc, chan, true);
>  }
>
> -static void
> -ath5k_setcurmode(struct ath5k_softc *sc, unsigned int mode)
> -{
> -       sc->curmode = mode;
> -
> -       if (mode == AR5K_MODE_11A) {
> -               sc->curband = &sc->sbands[IEEE80211_BAND_5GHZ];
> -       } else {
> -               sc->curband = &sc->sbands[IEEE80211_BAND_2GHZ];
> -       }
> -}
> -
>  struct ath_vif_iter_data {
>        const u8        *hw_macaddr;
>        u8              mask[ETH_ALEN];
> @@ -2776,12 +2764,6 @@ ath5k_init(struct ieee80211_hw *hw)
>                goto err;
>        }
>
> -       /* NB: setup here so ath5k_rate_update is happy */
> -       if (test_bit(AR5K_MODE_11A, ah->ah_modes))
> -               ath5k_setcurmode(sc, AR5K_MODE_11A);
> -       else
> -               ath5k_setcurmode(sc, AR5K_MODE_11B);
> -
>        /*
>         * Allocate tx+rx descriptors and populate the lists.
>         */
> diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
> index 6d51147..58660e4 100644
> --- a/drivers/net/wireless/ath/ath5k/base.h
> +++ b/drivers/net/wireless/ath/ath5k/base.h
> @@ -202,7 +202,6 @@ struct ath5k_softc {
>  #define ATH_STAT_STARTED       4               /* opened & irqs enabled */
>
>        unsigned int            filter_flags;   /* HW flags, AR5K_RX_FILTER_* */
> -       unsigned int            curmode;        /* current phy mode */
>        struct ieee80211_channel *curchan;      /* current h/w channel */
>
>        u16                     nvifs;
>


Acked-by: Nick Kossifidis <mickflemm@gmail.com>


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply

* Re: [PATCH 6/8] ath5: Remove unused CTL definitions
From: Nick Kossifidis @ 2011-01-19 15:55 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092102.19628.68971.stgit@localhost6.localdomain6>

2011/1/19 Bruno Randolf <br1@einfach.org>:
> They are unused in ath5k and a more detailled definition is in
> ath/regd_common.h.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>  drivers/net/wireless/ath/ath5k/eeprom.h |   23 -----------------------
>  1 files changed, 0 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/eeprom.h b/drivers/net/wireless/ath/ath5k/eeprom.h
> index d46f105..6511c27 100644
> --- a/drivers/net/wireless/ath/ath5k/eeprom.h
> +++ b/drivers/net/wireless/ath/ath5k/eeprom.h
> @@ -268,29 +268,6 @@ enum ath5k_ctl_mode {
>        AR5K_CTL_MODE_M = 15,
>  };
>
> -/* Default CTL ids for the 3 main reg domains.
> - * Atheros only uses these by default but vendors
> - * can have up to 32 different CTLs for different
> - * scenarios. Note that theese values are ORed with
> - * the mode id (above) so we can have up to 24 CTL
> - * datasets out of these 3 main regdomains. That leaves
> - * 8 ids that can be used by vendors and since 0x20 is
> - * missing from HAL sources i guess this is the set of
> - * custom CTLs vendors can use. */
> -#define        AR5K_CTL_FCC    0x10
> -#define        AR5K_CTL_CUSTOM 0x20
> -#define        AR5K_CTL_ETSI   0x30
> -#define        AR5K_CTL_MKK    0x40
> -
> -/* Indicates a CTL with only mode set and
> - * no reg domain mapping, such CTLs are used
> - * for world roaming domains or simply when
> - * a reg domain is not set */
> -#define        AR5K_CTL_NO_REGDOMAIN   0xf0
> -
> -/* Indicates an empty (invalid) CTL */
> -#define AR5K_CTL_NO_CTL                0xff
> -
>  /* Per channel calibration data, used for power table setup */
>  struct ath5k_chan_pcal_info_rf5111 {
>        /* Power levels in half dbm units
>


Acked-by: Nick Kossifidis <mickflemm@gmail.com>



-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply

* Re: [PATCH 5/8] ath5k: Add 802.11j 4.9GHz channels to allowed channels
From: Nick Kossifidis @ 2011-01-19 15:55 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092057.19628.9296.stgit@localhost6.localdomain6>

2011/1/19 Bruno Randolf <br1@einfach.org>:
> Add the 802.11j (20MHz channel width) channels to the allowed channels. This
> still does not enable 802.11j in ath5k since these frequencies are out of the
> configured range. A later patch will deal with that.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>  drivers/net/wireless/ath/ath5k/base.c |   19 +++++++++++++------
>  1 files changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index a28ad58..6900543 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -244,15 +244,21 @@ static int ath5k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *re
>  /*
>  * Returns true for the channel numbers used without all_channels modparam.
>  */
> -static bool ath5k_is_standard_channel(short chan)
> +static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
>  {
> -       return ((chan <= 14) ||
> -               /* UNII 1,2 */
> -               ((chan & 3) == 0 && chan >= 36 && chan <= 64) ||
> +       if (band == IEEE80211_BAND_2GHZ && chan <= 14)
> +               return true;
> +
> +       return  /* UNII 1,2 */
> +               (((chan & 3) == 0 && chan >= 36 && chan <= 64) ||
>                /* midband */
>                ((chan & 3) == 0 && chan >= 100 && chan <= 140) ||
>                /* UNII-3 */
> -               ((chan & 3) == 1 && chan >= 149 && chan <= 165));
> +               ((chan & 3) == 1 && chan >= 149 && chan <= 165) ||
> +               /* 802.11j 5.030-5.080 GHz (20MHz) */
> +               (chan == 8 || chan == 12 || chan == 16) ||
> +               /* 802.11j 4.9GHz (20MHz) */
> +               (chan == 184 || chan == 188 || chan == 192 || chan == 196));
>  }
>
>  static unsigned int
> @@ -291,7 +297,8 @@ ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels,
>                if (!ath5k_channel_ok(ah, freq, chfreq))
>                        continue;
>
> -               if (!modparam_all_channels && !ath5k_is_standard_channel(ch))
> +               if (!modparam_all_channels &&
> +                   !ath5k_is_standard_channel(ch, band))
>                        continue;
>
>                /* Write channel info and increment counter */
>


Acked-by: Nick Kossifidis <mickflemm@gmail.com>

-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply

* Re: [PATCH 3/8] ath5k: Rename ath5k_copy_channels
From: Nick Kossifidis @ 2011-01-19 15:54 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092047.19628.99228.stgit@localhost6.localdomain6>

2011/1/19 Bruno Randolf <br1@einfach.org>:
> Rename ath5k_copy_channels() to ath5k_setup_channels() - nothing is copied
> here.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>  drivers/net/wireless/ath/ath5k/base.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index 0387acb..9e8b1f4 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -256,7 +256,7 @@ static bool ath5k_is_standard_channel(short chan)
>  }
>
>  static unsigned int
> -ath5k_copy_channels(struct ath5k_hw *ah,
> +ath5k_setup_channels(struct ath5k_hw *ah,
>                struct ieee80211_channel *channels,
>                unsigned int mode,
>                unsigned int max)
> @@ -356,7 +356,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
>                sband->n_bitrates = 12;
>
>                sband->channels = sc->channels;
> -               sband->n_channels = ath5k_copy_channels(ah, sband->channels,
> +               sband->n_channels = ath5k_setup_channels(ah, sband->channels,
>                                        AR5K_MODE_11G, max_c);
>
>                hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
> @@ -382,7 +382,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
>                }
>
>                sband->channels = sc->channels;
> -               sband->n_channels = ath5k_copy_channels(ah, sband->channels,
> +               sband->n_channels = ath5k_setup_channels(ah, sband->channels,
>                                        AR5K_MODE_11B, max_c);
>
>                hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
> @@ -402,7 +402,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
>                sband->n_bitrates = 8;
>
>                sband->channels = &sc->channels[count_c];
> -               sband->n_channels = ath5k_copy_channels(ah, sband->channels,
> +               sband->n_channels = ath5k_setup_channels(ah, sband->channels,
>                                        AR5K_MODE_11A, max_c);
>
>                hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband;
>


Acked-by: Nick Kossifidis <mickflemm@gmail.com>


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply

* [PATCH 2/2] ath9k: Fix power save usage count imbalance on deinit
From: Rajkumar Manoharan @ 2011-01-19 15:47 UTC (permalink / raw)
  To: linux-wireless; +Cc: Rajkumar Manoharan, stable
In-Reply-To: <1295452063-13828-1-git-send-email-rmanoharan@atheros.com>

Upon unloading the driver, the ps_usecount is incremented
before configuring gpio registers in deinit_device.
But it is failed to restore the ps_usecount after that.
The problem is that the chip is moved to FULL SLEEP
by radio_disable when mac80211 is reporting as idle
though ps_usecount is not zero.

This patch retores ps_usecount properly and ensures that
the chip is always moved to full sleep only if ps usage
counte is zero which helps in debugging. And also fixes
the following warning.

ath: DMA failed to stop in 10 ms AR_CR=0xdeadbeef AR_DIAG_SW=0xdeadbeef
ath: Could not stop RX, we could be confusing the DMA engine when we
start RX up
------------[ cut here ]------------
WARNING: at drivers/net/wireless/ath/ath9k/recv.c:536
ath_stoprecv+0xf4/0x100 [ath9k]()

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/init.c |    2 ++
 drivers/net/wireless/ath/ath9k/main.c |    2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 767d8b8..b38c874 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -824,6 +824,8 @@ void ath9k_deinit_device(struct ath_softc *sc)
 	wiphy_rfkill_stop_polling(sc->hw->wiphy);
 	ath_deinit_leds(sc);
 
+	ath9k_ps_restore(sc);
+
 	for (i = 0; i < sc->num_sec_wiphy; i++) {
 		struct ath_wiphy *aphy = sc->sec_wiphy[i];
 		if (aphy == NULL)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index c03184e..aff1c72 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -966,8 +966,6 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw)
 
 	spin_unlock_bh(&sc->sc_pcu_lock);
 	ath9k_ps_restore(sc);
-
-	ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP);
 }
 
 int ath_reset(struct ath_softc *sc, bool retry_tx)
-- 
1.7.3.5


^ permalink raw reply related

* [PATCH 1/2] ath9k_hw: Fix system hang when resuming from S3/S4
From: Rajkumar Manoharan @ 2011-01-19 15:47 UTC (permalink / raw)
  To: linux-wireless; +Cc: Rajkumar Manoharan, Jack Lee

The bit 6 & 7 of AR_WA (0x4004) should be enabled only
for the chips that are supporting L0s functionality
while resuming back from S3/S4.

Enabling these bits for AR9280 is causing system hang
within a few S3/S4-resume cycles.

Cc: Jack Lee <jlee@atheros.com>
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/ar9002_hw.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
index f8a7771..f44c84a 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
@@ -426,9 +426,8 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah,
 		}
 
 		/* WAR for ASPM system hang */
-		if (AR_SREV_9280(ah) || AR_SREV_9285(ah) || AR_SREV_9287(ah)) {
+		if (AR_SREV_9285(ah) || AR_SREV_9287(ah))
 			val |= (AR_WA_BIT6 | AR_WA_BIT7);
-		}
 
 		if (AR_SREV_9285E_20(ah))
 			val |= AR_WA_BIT23;
-- 
1.7.3.5


^ permalink raw reply related

* Re: [PATCH 1/8] ath5k: Use mac80211 channel mapping function
From: Bob Copeland @ 2011-01-19 15:39 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092036.19628.84273.stgit@localhost6.localdomain6>

On Wed, Jan 19, 2011 at 4:20 AM, Bruno Randolf <br1@einfach.org> wrote:
> Use mac80211 channel mapping function instead of own homegrown version.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>  drivers/net/wireless/ath/ath5k/base.c |   23 ++++++++---------------
>  1 files changed, 8 insertions(+), 15 deletions(-)

Acked-by: Bob Copeland <me@bobcopeland.com>

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply

* Re: [PATCH 5/8] ath5k: Add 802.11j 4.9GHz channels to allowed channels
From: Bob Copeland @ 2011-01-19 15:18 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <201101192052.53702.br1@einfach.org>

On Wed, Jan 19, 2011 at 6:52 AM, Bruno Randolf <br1@einfach.org> >
That's also the reason why we need to know the band:
>
> in 2GHz all channels < 14 are allowed.
> in 5GHz only a few.
>
> Thanks for your review!

Oh, I get it now, yes, that makes sense :)

Acked-by: Bob Copeland <me@bobcopeland.com>

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply

* Re: [RFC] mac80211: support for IEEE80211N in IBSS
From: Johannes Berg @ 2011-01-19 14:35 UTC (permalink / raw)
  To: Alexander Simon; +Cc: linux-wireless
In-Reply-To: <201101191438.01161.alexander.simon@saxnet.de>

On Wed, 2011-01-19 at 14:38 +0100, Alexander Simon wrote:
> Hey list,
> 
> finally i got my (in ath9ks list announced) patch for HT rates in ad-hoc 
> networks ready that has been requested quite often.
> I took the initial patches from Benoît Papillault and worked on them.

Didn't he have versions that refactored more, like the IE building?
That'd be good in any case.

Can you split this up into a few patches and repost inline (not
attached) so we can review it more easily?

johannes


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox