* [PATCH 1/3] compat-wireless: make patch apply again.
@ 2010-09-15 20:43 Hauke Mehrtens
2010-09-15 20:43 ` [PATCH 2/3] " Hauke Mehrtens
2010-09-15 20:43 ` [PATCH 3/3] compat-wirelsss: add carl9170 Hauke Mehrtens
0 siblings, 2 replies; 7+ messages in thread
From: Hauke Mehrtens @ 2010-09-15 20:43 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
patches/99-change-makefiles.patch | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/patches/99-change-makefiles.patch b/patches/99-change-makefiles.patch
index 47f3b5c..c75f4f2 100644
--- a/patches/99-change-makefiles.patch
+++ b/patches/99-change-makefiles.patch
@@ -13,7 +13,7 @@ only the wireless stuff.
obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o
--- a/drivers/net/usb/Makefile
+++ b/drivers/net/usb/Makefile
-@@ -2,27 +2,7 @@
+@@ -2,28 +2,7 @@
# Makefile for USB Network drivers
#
@@ -40,6 +40,7 @@ only the wireless stuff.
-obj-$(CONFIG_USB_CDC_PHONET) += cdc-phonet.o
-obj-$(CONFIG_USB_IPHETH) += ipheth.o
-obj-$(CONFIG_USB_SIERRA_NET) += sierra_net.o
+-obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] compat-wireless: make patch apply again.
2010-09-15 20:43 [PATCH 1/3] compat-wireless: make patch apply again Hauke Mehrtens
@ 2010-09-15 20:43 ` Hauke Mehrtens
2010-09-15 22:03 ` Luis R. Rodriguez
2010-09-15 20:43 ` [PATCH 3/3] compat-wirelsss: add carl9170 Hauke Mehrtens
1 sibling, 1 reply; 7+ messages in thread
From: Hauke Mehrtens @ 2010-09-15 20:43 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
...k-Add-debugfs-interface-to-dump-registers.patch | 25 ++++++++++---------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/crap/0001-ath9k-Add-debugfs-interface-to-dump-registers.patch b/crap/0001-ath9k-Add-debugfs-interface-to-dump-registers.patch
index d236c46..a6c6d3e 100644
--- a/crap/0001-ath9k-Add-debugfs-interface-to-dump-registers.patch
+++ b/crap/0001-ath9k-Add-debugfs-interface-to-dump-registers.patch
@@ -42,13 +42,10 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
#ifdef CONFIG_ATH_DEBUG
static ssize_t read_file_debug(struct file *file, char __user *user_buf,
-@@ -893,7 +907,38 @@ static ssize_t write_file_regval(struct
- static const struct file_operations fops_regval = {
- .read = read_file_regval,
- .write = write_file_regval,
-- .open = ath9k_debugfs_open,
-+};
-+
+@@ -908,6 +922,40 @@ static const struct file_operations fops
+ .llseek = default_llseek,/* read accesses f_pos */
+ };
+
+#define REGDUMP_LINE_SIZE 20
+#define REGDUMP_NUM_REGS (0x16bd4 / 4 + 1)
+#define REGDUMP_DATA_LEN (REGDUMP_NUM_REGS * REGDUMP_LINE_SIZE + 1)
@@ -79,10 +76,14 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+ .open = open_file_regdump,
+ .read = ath9k_debugfs_read_buf,
+ .release = ath9k_debugfs_release_buf,
- .owner = THIS_MODULE
- };
-
-@@ -961,6 +1006,11 @@ int ath9k_init_debug(struct ath_hw *ah)
++ .owner = THIS_MODULE,
++ .llseek = default_llseek,/* read accesses f_pos */
++};
++
+ int ath9k_init_debug(struct ath_hw *ah)
+ {
+ struct ath_common *common = ath9k_hw_common(ah);
+@@ -972,6 +1020,11 @@ int ath9k_init_debug(struct ath_hw *ah)
goto err;
sc->debug.regidx = 0;
@@ -94,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
return 0;
err:
ath9k_exit_debug(ah);
-@@ -972,6 +1022,7 @@ void ath9k_exit_debug(struct ath_hw *ah)
+@@ -983,6 +1036,7 @@ void ath9k_exit_debug(struct ath_hw *ah)
struct ath_common *common = ath9k_hw_common(ah);
struct ath_softc *sc = (struct ath_softc *) common->priv;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 3/3] compat-wirelsss: add carl9170
2010-09-15 20:43 [PATCH 1/3] compat-wireless: make patch apply again Hauke Mehrtens
2010-09-15 20:43 ` [PATCH 2/3] " Hauke Mehrtens
@ 2010-09-15 20:43 ` Hauke Mehrtens
2010-09-15 20:50 ` Christian Lamparter
1 sibling, 1 reply; 7+ messages in thread
From: Hauke Mehrtens @ 2010-09-15 20:43 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
This patch adds upport for carl9170.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
config.mk | 6 +++++
patches/25-multicast-list_head.patch | 42 ++++++++++++++++++++++++++++++++-
scripts/admin-update.sh | 1 +
3 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/config.mk b/config.mk
index b61c318..5e7ae1b 100644
--- a/config.mk
+++ b/config.mk
@@ -411,6 +411,12 @@ CONFIG_AT76C50X_USB=m
ifndef CONFIG_COMPAT_KERNEL_28
CONFIG_AR9170_USB=m
CONFIG_AR9170_LEDS=y
+
+CONFIG_CARL9170=m
+CONFIG_CARL9170_LEDS=y
+# CONFIG_CARL9170_DEBUGFS=y
+# CONFIG_CARL9170_WPC=y
+
endif #CONFIG_COMPAT_KERNEL_28
CONFIG_ATH9K_HTC=m
diff --git a/patches/25-multicast-list_head.patch b/patches/25-multicast-list_head.patch
index 2869364..5a6bb16 100644
--- a/patches/25-multicast-list_head.patch
+++ b/patches/25-multicast-list_head.patch
@@ -69,7 +69,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
-@@ -1680,7 +1680,11 @@ static int __b44_load_mcast(struct b44 *
+@@ -1689,7 +1689,11 @@ static int __b44_load_mcast(struct b44 *
netdev_for_each_mc_addr(ha, dev) {
if (i == num_ents)
break;
@@ -227,6 +227,44 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
return ((u64)(mfilt[1]) << 32) | mfilt[0];
+--- a/drivers/net/wireless/ath/carl9170/main.c
++++ b/drivers/net/wireless/ath/carl9170/main.c
+@@ -810,17 +810,35 @@ out:
+ return err;
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw,
+ struct netdev_hw_addr_list *mc_list)
++#else
++static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count,
++ struct dev_addr_list *ha)
++#endif
+ {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ struct netdev_hw_addr *ha;
++#else
++ int i;
++#endif
+ u64 mchash;
+
+ /* always get broadcast frames */
+ mchash = 1ULL << (0xff >> 2);
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ netdev_hw_addr_list_for_each(ha, mc_list)
+ mchash |= 1ULL << (ha->addr[5] >> 2);
++#else
++ for (i = 0; i < mc_count; i++) {
++ if (WARN_ON(!ha))
++ break;
++ mchash |= 1ULL << (ha->dmi_addr[5] >> 2);
++ ha = ha->next;
++ }
++#endif
+
+ return mchash;
+ }
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -242,18 +242,34 @@ static int lbs_add_mcast_addrs(struct cm
@@ -693,7 +731,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
spin_unlock_bh(&local->filter_lock);
/* be a bit nasty */
-@@ -521,9 +525,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(
+@@ -524,9 +528,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(
local->uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;
INIT_LIST_HEAD(&local->interfaces);
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 6ef281d..ac9470d 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -192,6 +192,7 @@ fi
# Drivers that have their own directory
DRIVERS="drivers/net/wireless/ath"
+DRIVERS="$DRIVERS drivers/net/wireless/ath/carl9170"
DRIVERS="$DRIVERS drivers/net/wireless/ath/ar9170"
DRIVERS="$DRIVERS drivers/net/wireless/ath/ath5k"
DRIVERS="$DRIVERS drivers/net/wireless/ath/ath9k"
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 3/3] compat-wirelsss: add carl9170
2010-09-15 20:43 ` [PATCH 3/3] compat-wirelsss: add carl9170 Hauke Mehrtens
@ 2010-09-15 20:50 ` Christian Lamparter
2010-09-15 21:11 ` Luis R. Rodriguez
0 siblings, 1 reply; 7+ messages in thread
From: Christian Lamparter @ 2010-09-15 20:50 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: lrodriguez, linux-wireless, mcgrof
On Wednesday 15 September 2010 22:43:35 Hauke Mehrtens wrote:
> This patch adds upport for carl9170.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
NACK
usb_get_from_anchor is not thread-safe on older kernel.
See details:
https://patchwork.kernel.org/patch/118946/
> ---
> config.mk | 6 +++++
> patches/25-multicast-list_head.patch | 42 ++++++++++++++++++++++++++++++++-
> scripts/admin-update.sh | 1 +
> 3 files changed, 47 insertions(+), 2 deletions(-)
>
> diff --git a/config.mk b/config.mk
> index b61c318..5e7ae1b 100644
> --- a/config.mk
> +++ b/config.mk
> @@ -411,6 +411,12 @@ CONFIG_AT76C50X_USB=m
> ifndef CONFIG_COMPAT_KERNEL_28
> CONFIG_AR9170_USB=m
> CONFIG_AR9170_LEDS=y
> +
> +CONFIG_CARL9170=m
> +CONFIG_CARL9170_LEDS=y
> +# CONFIG_CARL9170_DEBUGFS=y
> +# CONFIG_CARL9170_WPC=y
> +
> endif #CONFIG_COMPAT_KERNEL_28
>
> CONFIG_ATH9K_HTC=m
> diff --git a/patches/25-multicast-list_head.patch b/patches/25-multicast-list_head.patch
> index 2869364..5a6bb16 100644
> --- a/patches/25-multicast-list_head.patch
> +++ b/patches/25-multicast-list_head.patch
> @@ -69,7 +69,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
> }
> --- a/drivers/net/b44.c
> +++ b/drivers/net/b44.c
> -@@ -1680,7 +1680,11 @@ static int __b44_load_mcast(struct b44 *
> +@@ -1689,7 +1689,11 @@ static int __b44_load_mcast(struct b44 *
> netdev_for_each_mc_addr(ha, dev) {
> if (i == num_ents)
> break;
> @@ -227,6 +227,44 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
> }
>
> return ((u64)(mfilt[1]) << 32) | mfilt[0];
> +--- a/drivers/net/wireless/ath/carl9170/main.c
> ++++ b/drivers/net/wireless/ath/carl9170/main.c
> +@@ -810,17 +810,35 @@ out:
> + return err;
> + }
> +
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
> + static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw,
> + struct netdev_hw_addr_list *mc_list)
> ++#else
> ++static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count,
> ++ struct dev_addr_list *ha)
> ++#endif
> + {
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
> + struct netdev_hw_addr *ha;
> ++#else
> ++ int i;
> ++#endif
> + u64 mchash;
> +
> + /* always get broadcast frames */
> + mchash = 1ULL << (0xff >> 2);
> +
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
> + netdev_hw_addr_list_for_each(ha, mc_list)
> + mchash |= 1ULL << (ha->addr[5] >> 2);
> ++#else
> ++ for (i = 0; i < mc_count; i++) {
> ++ if (WARN_ON(!ha))
> ++ break;
> ++ mchash |= 1ULL << (ha->dmi_addr[5] >> 2);
> ++ ha = ha->next;
> ++ }
> ++#endif
> +
> + return mchash;
> + }
> --- a/drivers/net/wireless/libertas/main.c
> +++ b/drivers/net/wireless/libertas/main.c
> @@ -242,18 +242,34 @@ static int lbs_add_mcast_addrs(struct cm
> @@ -693,7 +731,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
> spin_unlock_bh(&local->filter_lock);
>
> /* be a bit nasty */
> -@@ -521,9 +525,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(
> +@@ -524,9 +528,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(
> local->uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;
>
> INIT_LIST_HEAD(&local->interfaces);
> diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
> index 6ef281d..ac9470d 100755
> --- a/scripts/admin-update.sh
> +++ b/scripts/admin-update.sh
> @@ -192,6 +192,7 @@ fi
>
> # Drivers that have their own directory
> DRIVERS="drivers/net/wireless/ath"
> +DRIVERS="$DRIVERS drivers/net/wireless/ath/carl9170"
> DRIVERS="$DRIVERS drivers/net/wireless/ath/ar9170"
> DRIVERS="$DRIVERS drivers/net/wireless/ath/ath5k"
> DRIVERS="$DRIVERS drivers/net/wireless/ath/ath9k"
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] compat-wireless: remove already applied patches
@ 2010-10-07 21:21 Hauke Mehrtens
2010-10-07 21:21 ` [PATCH 2/3] compat-wireless: make patch apply again Hauke Mehrtens
0 siblings, 1 reply; 7+ messages in thread
From: Hauke Mehrtens @ 2010-10-07 21:21 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
...0211-perform-scan-cancel-in-hw-reset-work.patch | 72 -----
...carl9170-support-firmware-based-rx-filter.patch | 280 --------------------
2 files changed, 0 insertions(+), 352 deletions(-)
delete mode 100644 linux-next-pending/0001-mac80211-perform-scan-cancel-in-hw-reset-work.patch
delete mode 100644 linux-next-pending/0002-carl9170-support-firmware-based-rx-filter.patch
diff --git a/linux-next-pending/0001-mac80211-perform-scan-cancel-in-hw-reset-work.patch b/linux-next-pending/0001-mac80211-perform-scan-cancel-in-hw-reset-work.patch
deleted file mode 100644
index d606cbc..0000000
--- a/linux-next-pending/0001-mac80211-perform-scan-cancel-in-hw-reset-work.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-
-Reason for adding to linux-next-pending/ :
-
-On Fri, Oct 01, 2010 at 05:47:53AM -0700, Christian Lamparter wrote:
-> Currently, everyone is waiting for:
-> "[PATCH 1/6] mac80211: perform scan cancel in hw reset work"
-> (hopefully, it fixes the dreaded ieee80211_hw_restart deadlock.)
-
-We need this for testing purposes for carl9170 which may
-get done this weekend.
-
-From 6b2daf7ad7067f3acc90f046700383a2c3ffad19 Mon Sep 17 00:00:00 2001
-From: Stanislaw Gruszka <sgruszka@redhat.com>
-Date: Fri, 1 Oct 2010 14:05:27 +0200
-Subject: [PATCH] mac80211: perform scan cancel in hw reset work
-
-Move ieee80211_scan_cancel() and all other related code to
-ieee80211_restart_work() as ieee80211_restart_hw() is intended to be
-callable from any context.
-
-Fix a bug that RTNL lock is not taken during ieee80211_cancel_scan().
-
-Take local->mtx before WARN(test_bit(SCAN_HW_SCANNING, &local->scanning)
-to prevent the race condition with __ieee80211_start_scan() described
-here: http://marc.info/?l=linux-wireless&m=128516716810537&w=2
-
-Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
----
- net/mac80211/main.c | 19 ++++++++++---------
- 1 files changed, 10 insertions(+), 9 deletions(-)
-
-diff --git a/net/mac80211/main.c b/net/mac80211/main.c
-index db341a9..ba332ef 100644
---- a/net/mac80211/main.c
-+++ b/net/mac80211/main.c
-@@ -295,7 +295,17 @@ static void ieee80211_restart_work(struct work_struct *work)
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local, restart_work);
-
-+ /* wait for scan work complete */
-+ flush_workqueue(local->workqueue);
-+
-+ mutex_lock(&local->mtx);
-+ WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
-+ "%s called with hardware scan in progress\n", __func__);
-+ mutex_unlock(&local->mtx);
-+
- rtnl_lock();
-+ if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)))
-+ ieee80211_scan_cancel(local);
- ieee80211_reconfig(local);
- rtnl_unlock();
- }
-@@ -306,15 +316,6 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw)
-
- trace_api_restart_hw(local);
-
-- /* wait for scan work complete */
-- flush_workqueue(local->workqueue);
--
-- WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
-- "%s called with hardware scan in progress\n", __func__);
--
-- if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)))
-- ieee80211_scan_cancel(local);
--
- /* use this reason, ieee80211_reconfig will unblock it */
- ieee80211_stop_queues_by_reason(hw,
- IEEE80211_QUEUE_STOP_REASON_SUSPEND);
---
-1.7.0.4
-
diff --git a/linux-next-pending/0002-carl9170-support-firmware-based-rx-filter.patch b/linux-next-pending/0002-carl9170-support-firmware-based-rx-filter.patch
deleted file mode 100644
index 4c829e8..0000000
--- a/linux-next-pending/0002-carl9170-support-firmware-based-rx-filter.patch
+++ /dev/null
@@ -1,280 +0,0 @@
-
-Reason for it not being merged upstream yet: backlog.
-Since this will help with load and memory we want this for
-final testing and evaluation of the driver.
-
-From 8f56ba52913d4260fd7148a5919d913561e62cbd Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey@googlemail.com>
-Date: Tue, 28 Sep 2010 23:00:59 +0200
-Subject: [PATCH] carl9170: support firmware-based rx filter
-
-The hardware rx-filter was essentially disabled, because
-of a serve, yet unidentifiable problem with iwlagn.
-Due to these circumstances the driver and mac80211 were
-left with the job of filtering.
-
-This is very unfortunate and has proven to be expensive
-in terms of latency, memory and load.
-
-Therefore the new 1.8.8.3 firmware introduces a flexible
-filtering infrastructure which allows the driver to
-offload some of the checks (FCS & PLCP crc check,
-RA match, control frame filter, etc...) whenever possible.
-
-Note:
-This patch also includes all changes to the
-shared headers files since the inclusion.
-
-Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
----
- drivers/net/wireless/ath/carl9170/carl9170.h | 2 +
- drivers/net/wireless/ath/carl9170/cmd.h | 10 ++++++++
- drivers/net/wireless/ath/carl9170/fw.c | 7 ++++++
- drivers/net/wireless/ath/carl9170/fwcmd.h | 16 +++++++++++++
- drivers/net/wireless/ath/carl9170/fwdesc.h | 6 ++++-
- drivers/net/wireless/ath/carl9170/hw.h | 3 ++
- drivers/net/wireless/ath/carl9170/main.c | 30 ++++++++++++++++++++++++-
- drivers/net/wireless/ath/carl9170/phy.h | 5 +---
- drivers/net/wireless/ath/carl9170/version.h | 6 ++--
- 9 files changed, 75 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
-index 20f2a77..6cf0c9e 100644
---- a/drivers/net/wireless/ath/carl9170/carl9170.h
-+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
-@@ -279,6 +279,7 @@ struct ar9170 {
- unsigned int beacon_max_len;
- bool rx_stream;
- bool tx_stream;
-+ bool rx_filter;
- unsigned int mem_blocks;
- unsigned int mem_block_size;
- unsigned int rx_size;
-@@ -314,6 +315,7 @@ struct ar9170 {
- u64 cur_mc_hash;
- u32 cur_filter;
- unsigned int filter_state;
-+ unsigned int rx_filter_caps;
- bool sniffer_enabled;
-
- /* MAC */
-diff --git a/drivers/net/wireless/ath/carl9170/cmd.h b/drivers/net/wireless/ath/carl9170/cmd.h
-index 0fc83d2..f78728c 100644
---- a/drivers/net/wireless/ath/carl9170/cmd.h
-+++ b/drivers/net/wireless/ath/carl9170/cmd.h
-@@ -59,6 +59,16 @@ static inline int carl9170_flush_cab(struct ar9170 *ar,
- return carl9170_bcn_ctrl(ar, vif_id, CARL9170_BCN_CTRL_DRAIN, 0, 0);
- }
-
-+static inline int carl9170_rx_filter(struct ar9170 *ar,
-+ const unsigned int _rx_filter)
-+{
-+ __le32 rx_filter = cpu_to_le32(_rx_filter);
-+
-+ return carl9170_exec_cmd(ar, CARL9170_CMD_RX_FILTER,
-+ sizeof(rx_filter), (u8 *)&rx_filter,
-+ 0, NULL);
-+}
-+
- struct carl9170_cmd *carl9170_cmd_buf(struct ar9170 *ar,
- const enum carl9170_cmd_oids cmd, const unsigned int len);
-
-diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c
-index 3661546..ae6c006 100644
---- a/drivers/net/wireless/ath/carl9170/fw.c
-+++ b/drivers/net/wireless/ath/carl9170/fw.c
-@@ -257,6 +257,13 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len)
- if (SUPP(CARL9170FW_USB_UP_STREAM))
- ar->fw.rx_stream = true;
-
-+ if (SUPP(CARL9170FW_RX_FILTER)) {
-+ ar->fw.rx_filter = true;
-+ ar->rx_filter_caps = FIF_FCSFAIL | FIF_PLCPFAIL |
-+ FIF_CONTROL | FIF_PSPOLL | FIF_OTHER_BSS |
-+ FIF_PROMISC_IN_BSS;
-+ }
-+
- ar->fw.vif_num = otus_desc->vif_num;
- ar->fw.cmd_bufs = otus_desc->cmd_bufs;
- ar->fw.address = le32_to_cpu(otus_desc->fw_address);
-diff --git a/drivers/net/wireless/ath/carl9170/fwcmd.h b/drivers/net/wireless/ath/carl9170/fwcmd.h
-index d4a4e1d..d552166 100644
---- a/drivers/net/wireless/ath/carl9170/fwcmd.h
-+++ b/drivers/net/wireless/ath/carl9170/fwcmd.h
-@@ -53,6 +53,7 @@ enum carl9170_cmd_oids {
- CARL9170_CMD_REBOOT = 0x04,
- CARL9170_CMD_BCN_CTRL = 0x05,
- CARL9170_CMD_READ_TSF = 0x06,
-+ CARL9170_CMD_RX_FILTER = 0x07,
-
- /* CAM */
- CARL9170_CMD_EKEY = 0x10,
-@@ -153,6 +154,20 @@ struct carl9170_psm {
- } __packed;
- #define CARL9170_PSM_SIZE 4
-
-+struct carl9170_rx_filter_cmd {
-+ __le32 rx_filter;
-+} __packed;
-+#define CARL9170_RX_FILTER_CMD_SIZE 4
-+
-+#define CARL9170_RX_FILTER_BAD 0x01
-+#define CARL9170_RX_FILTER_OTHER_RA 0x02
-+#define CARL9170_RX_FILTER_DECRY_FAIL 0x04
-+#define CARL9170_RX_FILTER_CTL_OTHER 0x08
-+#define CARL9170_RX_FILTER_CTL_PSPOLL 0x10
-+#define CARL9170_RX_FILTER_CTL_BACKR 0x20
-+#define CARL9170_RX_FILTER_MGMT 0x40
-+#define CARL9170_RX_FILTER_DATA 0x80
-+
- struct carl9170_bcn_ctrl_cmd {
- __le32 vif_id;
- __le32 mode;
-@@ -188,6 +203,7 @@ struct carl9170_cmd {
- struct carl9170_rf_init rf_init;
- struct carl9170_psm psm;
- struct carl9170_bcn_ctrl_cmd bcn_ctrl;
-+ struct carl9170_rx_filter_cmd rx_filter;
- u8 data[CARL9170_MAX_CMD_PAYLOAD_LEN];
- } __packed;
- } __packed;
-diff --git a/drivers/net/wireless/ath/carl9170/fwdesc.h b/drivers/net/wireless/ath/carl9170/fwdesc.h
-index 7cd8117..71f3821 100644
---- a/drivers/net/wireless/ath/carl9170/fwdesc.h
-+++ b/drivers/net/wireless/ath/carl9170/fwdesc.h
-@@ -66,6 +66,9 @@ enum carl9170fw_feature_list {
- /* Firmware PSM support | CARL9170_CMD_PSM */
- CARL9170FW_PSM,
-
-+ /* Firmware RX filter | CARL9170_CMD_RX_FILTER */
-+ CARL9170FW_RX_FILTER,
-+
- /* KEEP LAST */
- __CARL9170FW_FEATURE_NUM
- };
-@@ -142,7 +145,7 @@ struct carl9170fw_fix_desc {
- (sizeof(struct carl9170fw_fix_desc))
-
- #define CARL9170FW_DBG_DESC_MIN_VER 1
--#define CARL9170FW_DBG_DESC_CUR_VER 2
-+#define CARL9170FW_DBG_DESC_CUR_VER 3
- struct carl9170fw_dbg_desc {
- struct carl9170fw_desc_head head;
-
-@@ -150,6 +153,7 @@ struct carl9170fw_dbg_desc {
- __le32 counter_addr;
- __le32 rx_total_addr;
- __le32 rx_overrun_addr;
-+ __le32 rx_filter;
-
- /* Put your debugging definitions here */
- } __packed;
-diff --git a/drivers/net/wireless/ath/carl9170/hw.h b/drivers/net/wireless/ath/carl9170/hw.h
-index b1292ac..2f471b3 100644
---- a/drivers/net/wireless/ath/carl9170/hw.h
-+++ b/drivers/net/wireless/ath/carl9170/hw.h
-@@ -731,6 +731,9 @@ struct ar9170_stream {
- #define SET_VAL(reg, value, newvalue) \
- (value = ((value) & ~reg) | (((newvalue) << reg##_S) & reg))
-
-+#define SET_CONSTVAL(reg, newvalue) \
-+ (((newvalue) << reg##_S) & reg)
-+
- #define MOD_VAL(reg, value, newvalue) \
- (((value) & ~reg) | (((newvalue) << reg##_S) & reg))
- #endif /* __CARL9170_SHARED_HW_H */
-diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
-index 84bd38e..3cc99f3 100644
---- a/drivers/net/wireless/ath/carl9170/main.c
-+++ b/drivers/net/wireless/ath/carl9170/main.c
-@@ -380,6 +380,13 @@ static int carl9170_op_start(struct ieee80211_hw *hw)
- if (err)
- goto out;
-
-+ if (ar->fw.rx_filter) {
-+ err = carl9170_rx_filter(ar, CARL9170_RX_FILTER_OTHER_RA |
-+ CARL9170_RX_FILTER_CTL_OTHER | CARL9170_RX_FILTER_BAD);
-+ if (err)
-+ goto out;
-+ }
-+
- err = carl9170_write_reg(ar, AR9170_MAC_REG_DMA_TRIGGER,
- AR9170_DMA_TRIGGER_RXQ);
- if (err)
-@@ -840,8 +847,7 @@ static void carl9170_op_configure_filter(struct ieee80211_hw *hw,
- struct ar9170 *ar = hw->priv;
-
- /* mask supported flags */
-- *new_flags &= FIF_ALLMULTI | FIF_FCSFAIL | FIF_PLCPFAIL |
-- FIF_OTHER_BSS | FIF_PROMISC_IN_BSS;
-+ *new_flags &= FIF_ALLMULTI | ar->rx_filter_caps;
-
- if (!IS_ACCEPTING_CMD(ar))
- return;
-@@ -867,6 +873,26 @@ static void carl9170_op_configure_filter(struct ieee80211_hw *hw,
- WARN_ON(carl9170_set_operating_mode(ar));
- }
-
-+ if (ar->fw.rx_filter && changed_flags & ar->rx_filter_caps) {
-+ u32 rx_filter = 0;
-+
-+ if (!(*new_flags & (FIF_FCSFAIL | FIF_PLCPFAIL)))
-+ rx_filter |= CARL9170_RX_FILTER_BAD;
-+
-+ if (!(*new_flags & FIF_CONTROL))
-+ rx_filter |= CARL9170_RX_FILTER_CTL_OTHER;
-+
-+ if (!(*new_flags & FIF_PSPOLL))
-+ rx_filter |= CARL9170_RX_FILTER_CTL_PSPOLL;
-+
-+ if (!(*new_flags & (FIF_OTHER_BSS | FIF_PROMISC_IN_BSS))) {
-+ rx_filter |= CARL9170_RX_FILTER_OTHER_RA;
-+ rx_filter |= CARL9170_RX_FILTER_DECRY_FAIL;
-+ }
-+
-+ WARN_ON(carl9170_rx_filter(ar, rx_filter));
-+ }
-+
- mutex_unlock(&ar->mutex);
- }
-
-diff --git a/drivers/net/wireless/ath/carl9170/phy.h b/drivers/net/wireless/ath/carl9170/phy.h
-index 53c18d3..02c34eb 100644
---- a/drivers/net/wireless/ath/carl9170/phy.h
-+++ b/drivers/net/wireless/ath/carl9170/phy.h
-@@ -423,8 +423,8 @@
- #define AR9170_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV 0x2000
- #define AR9170_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV_S 13
-
--#define AR9170_PHY_REG_GAIN_2GHZ_CHAIN_2 (AR9170_PHY_REG_BASE + 0x2a0c)
- #define AR9170_PHY_REG_GAIN_2GHZ (AR9170_PHY_REG_BASE + 0x0a0c)
-+#define AR9170_PHY_REG_GAIN_2GHZ_CHAIN_2 (AR9170_PHY_REG_BASE + 0x2a0c)
- #define AR9170_PHY_GAIN_2GHZ_RXTX_MARGIN 0x00fc0000
- #define AR9170_PHY_GAIN_2GHZ_RXTX_MARGIN_S 18
- #define AR9170_PHY_GAIN_2GHZ_BSW_MARGIN 0x00003c00
-@@ -561,7 +561,4 @@
- #define AR9170_PHY_CH2_EXT_MINCCA_PWR 0xff800000
- #define AR9170_PHY_CH2_EXT_MINCCA_PWR_S 23
-
--#define REDUCE_CHAIN_0 0x00000050
--#define REDUCE_CHAIN_1 0x00000051
--
- #endif /* __CARL9170_SHARED_PHY_H */
-diff --git a/drivers/net/wireless/ath/carl9170/version.h b/drivers/net/wireless/ath/carl9170/version.h
-index 0e917f8..ff53f07 100644
---- a/drivers/net/wireless/ath/carl9170/version.h
-+++ b/drivers/net/wireless/ath/carl9170/version.h
-@@ -1,7 +1,7 @@
- #ifndef __CARL9170_SHARED_VERSION_H
- #define __CARL9170_SHARED_VERSION_H
- #define CARL9170FW_VERSION_YEAR 10
--#define CARL9170FW_VERSION_MONTH 8
--#define CARL9170FW_VERSION_DAY 30
--#define CARL9170FW_VERSION_GIT "1.8.8.1"
-+#define CARL9170FW_VERSION_MONTH 9
-+#define CARL9170FW_VERSION_DAY 28
-+#define CARL9170FW_VERSION_GIT "1.8.8.3"
- #endif /* __CARL9170_SHARED_VERSION_H */
---
-1.7.0.4
-
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/3] compat-wireless: make patch apply again
2010-10-07 21:21 [PATCH 1/3] compat-wireless: remove already applied patches Hauke Mehrtens
@ 2010-10-07 21:21 ` Hauke Mehrtens
0 siblings, 0 replies; 7+ messages in thread
From: Hauke Mehrtens @ 2010-10-07 21:21 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
patches/04-netns.patch | 38 ++++++++------------------------------
patches/09-threaded-irq.patch | 9 +++++----
2 files changed, 13 insertions(+), 34 deletions(-)
diff --git a/patches/04-netns.patch b/patches/04-netns.patch
index 3bdcdfb..44d3f84 100644
--- a/patches/04-netns.patch
+++ b/patches/04-netns.patch
@@ -4,31 +4,9 @@ for the other changes. It'd be nice to figure out a way to
bring thise here cleanly and seprately but they touch the same
files...
---- a/net/wireless/nl80211.c
-+++ b/net/wireless/nl80211.c
-@@ -30,7 +30,9 @@ static struct genl_family nl80211_fam =
- .hdrsize = 0, /* no private header */
- .version = 1, /* no particular meaning now */
- .maxattr = NL80211_ATTR_MAX,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
- .netnsok = true,
-+#endif
- };
-
- /* internal helper: get rdev and dev */
-@@ -4462,7 +4464,9 @@ static int nl80211_wiphy_netns(struct sk
-
- err = cfg80211_switch_netns(rdev, net);
- out_put_net:
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- put_net(net);
-+#endif
- out:
- cfg80211_unlock_rdev(rdev);
- out_rtnl:
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
-@@ -224,6 +224,7 @@ int cfg80211_dev_rename(struct cfg80211_
+@@ -208,6 +208,7 @@ int cfg80211_dev_rename(struct cfg80211_
return 0;
}
@@ -36,7 +14,7 @@ files...
int cfg80211_switch_netns(struct cfg80211_registered_device *rdev,
struct net *net)
{
-@@ -264,6 +265,7 @@ int cfg80211_switch_netns(struct cfg8021
+@@ -248,6 +249,7 @@ int cfg80211_switch_netns(struct cfg8021
return 0;
}
@@ -44,7 +22,7 @@ files...
static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data)
{
-@@ -376,7 +378,9 @@ struct wiphy *wiphy_new(const struct cfg
+@@ -382,7 +384,9 @@ too_many_devs:
rdev->wiphy.flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT;
#endif
@@ -54,7 +32,7 @@ files...
rdev->rfkill_ops.set_block = cfg80211_rfkill_set_block;
rdev->rfkill = rfkill_alloc(dev_name(&rdev->wiphy.dev),
-@@ -694,8 +698,10 @@ static int cfg80211_netdev_notifier_call
+@@ -700,8 +704,10 @@ static int cfg80211_netdev_notifier_call
mutex_lock(&rdev->devlist_mtx);
list_add_rcu(&wdev->list, &rdev->netdev_list);
rdev->devlist_generation++;
@@ -65,7 +43,7 @@ files...
if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj,
"phy80211")) {
-@@ -841,6 +847,7 @@ static struct notifier_block cfg80211_ne
+@@ -847,6 +853,7 @@ static struct notifier_block cfg80211_ne
.notifier_call = cfg80211_netdev_notifier_call,
};
@@ -73,7 +51,7 @@ files...
static void __net_exit cfg80211_pernet_exit(struct net *net)
{
struct cfg80211_registered_device *rdev;
-@@ -858,14 +865,17 @@ static void __net_exit cfg80211_pernet_e
+@@ -864,14 +871,17 @@ static void __net_exit cfg80211_pernet_e
static struct pernet_operations cfg80211_pernet_ops = {
.exit = cfg80211_pernet_exit,
};
@@ -91,7 +69,7 @@ files...
err = wiphy_sysfs_init();
if (err)
-@@ -900,8 +910,10 @@ out_fail_nl80211:
+@@ -906,8 +916,10 @@ out_fail_nl80211:
out_fail_notifier:
wiphy_sysfs_exit();
out_fail_sysfs:
@@ -102,7 +80,7 @@ files...
return err;
}
subsys_initcall(cfg80211_init);
-@@ -913,7 +925,9 @@ static void __exit cfg80211_exit(void)
+@@ -919,7 +931,9 @@ static void __exit cfg80211_exit(void)
unregister_netdevice_notifier(&cfg80211_netdev_notifier);
wiphy_sysfs_exit();
regulatory_exit();
diff --git a/patches/09-threaded-irq.patch b/patches/09-threaded-irq.patch
index 86c1ae1..4c29f7f 100644
--- a/patches/09-threaded-irq.patch
+++ b/patches/09-threaded-irq.patch
@@ -51,7 +51,7 @@ thread in process context as well.
b43_release_firmware(dev);
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
-@@ -756,6 +756,9 @@ struct b43_wldev {
+@@ -757,6 +757,9 @@ struct b43_wldev {
unsigned int tx_count;
unsigned int rx_count;
#endif
@@ -63,10 +63,11 @@ thread in process context as well.
/* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
-@@ -884,6 +884,9 @@ struct rt2x00_dev {
- * and interrupt thread routine.
+@@ -902,6 +902,10 @@ struct rt2x00_dev {
+ * Tasklet for processing tx status reports (rt2800pci).
*/
- u32 irqvalue[2];
+ struct tasklet_struct txstatus_tasklet;
++
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+ struct compat_threaded_irq irq_compat;
+#endif
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-10-07 21:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-15 20:43 [PATCH 1/3] compat-wireless: make patch apply again Hauke Mehrtens
2010-09-15 20:43 ` [PATCH 2/3] " Hauke Mehrtens
2010-09-15 22:03 ` Luis R. Rodriguez
2010-09-15 20:43 ` [PATCH 3/3] compat-wirelsss: add carl9170 Hauke Mehrtens
2010-09-15 20:50 ` Christian Lamparter
2010-09-15 21:11 ` Luis R. Rodriguez
-- strict thread matches above, loose matches on Subject: below --
2010-10-07 21:21 [PATCH 1/3] compat-wireless: remove already applied patches Hauke Mehrtens
2010-10-07 21:21 ` [PATCH 2/3] compat-wireless: make patch apply again Hauke Mehrtens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).