* [PATCH 3/3] backports: add SPEED_UNKNOWN and DUPLEX_UNKNOWN
From: Luis R. Rodriguez @ 2013-07-01 20:55 UTC (permalink / raw)
To: backports; +Cc: linux-wireless, Luis R. Rodriguez
In-Reply-To: <1372712120-16606-1-git-send-email-mcgrof@do-not-panic.com>
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
This gets us in synch with next-20130618.
This was added via uapi/linux/ethtool.h but using
that file causes some odd issues I simply cannot
resolve right now. I stuff these definitions into
the regular include/linux/ethtool.h for now.
This backports commit 589665f5 added via v3.2.
mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains \
589665f5a6008dbce1d0af2cb93e94a80bf78151
v3.2-rc1~4^2~10
commit 589665f5a6008dbce1d0af2cb93e94a80bf78151
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri Nov 4 08:21:38 2011 +0000
bonding: comparing a u8 with -1 is always false
slave->duplex is a u8 type so the in bond_info_show_slave() when we
check "if (slave->duplex == -1)", it's always false.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 2.6.24 [ OK ]
2 2.6.25 [ OK ]
3 2.6.26 [ OK ]
4 2.6.27 [ OK ]
5 2.6.28 [ OK ]
6 2.6.29 [ OK ]
7 2.6.30 [ OK ]
8 2.6.31 [ OK ]
9 2.6.32 [ OK ]
10 2.6.33 [ OK ]
11 2.6.34 [ OK ]
12 2.6.35 [ OK ]
13 2.6.36 [ OK ]
14 2.6.37 [ OK ]
15 2.6.38 [ OK ]
16 2.6.39 [ OK ]
17 3.0.79 [ OK ]
18 3.1.10 [ OK ]
19 3.10-rc1 [ OK ]
20 3.2.45 [ OK ]
21 3.3.8 [ OK ]
22 3.4.46 [ OK ]
23 3.5.7 [ OK ]
24 3.6.11 [ OK ]
25 3.7.10 [ OK ]
26 3.8.13 [ OK ]
27 3.9.3 [ OK ]
real 15m7.262s
user 335m33.818s
sys 82m36.486s
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
backport/backport-include/linux/ethtool.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/backport/backport-include/linux/ethtool.h b/backport/backport-include/linux/ethtool.h
index 0c1eee6..2f323b0 100644
--- a/backport/backport-include/linux/ethtool.h
+++ b/backport/backport-include/linux/ethtool.h
@@ -3,6 +3,14 @@
#include_next <linux/ethtool.h>
#include <linux/version.h>
+#ifndef SPEED_UNKNOWN
+#define SPEED_UNKNOWN -1
+#endif /* SPEED_UNKNOWN */
+
+#ifndef DUPLEX_UNKNOWN
+#define DUPLEX_UNKNOWN 0xff
+#endif /* DUPLEX_UNKNOWN */
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
#define ethtool_rxfh_indir_default LINUX_BACKPORT(ethtool_rxfh_indir_default)
static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings)
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/3] backports: add new alx upstream backport
From: Luis R. Rodriguez @ 2013-07-01 20:55 UTC (permalink / raw)
To: backports; +Cc: linux-wireless, Luis R. Rodriguez
In-Reply-To: <1372712120-16606-1-git-send-email-mcgrof@do-not-panic.com>
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
This backports the new upstream alx driver and
properly splits up each required backports into
its respective collateral evolution bucket.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
.../network/0001-netdev_ops/alx.patch | 11 ++
.../network/0007-pci_dev_dev_flags/INFO | 28 +++++
.../network/0007-pci_dev_dev_flags/alx.patch | 13 +++
.../drivers_net_ethernet_atheros_alx_main.patch | 24 ++++
.../drivers_net_ethernet_atheros_alx_main.patch | 14 +++
.../drivers_net_ethernet_atheros_alx_main.patch | 58 +++++++++
.../drivers_net_ethernet_atheros_alx_main.patch | 13 +++
.../network/0001-backport-alx/alx.patch | 123 --------------------
.../0003-alx-deactivate-loopback-test/alx.patch | 25 ----
9 files changed, 161 insertions(+), 148 deletions(-)
create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/alx.patch
create mode 100644 patches/collateral-evolutions/network/0007-pci_dev_dev_flags/INFO
create mode 100644 patches/collateral-evolutions/network/0007-pci_dev_dev_flags/alx.patch
create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_alx_main.patch
create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_alx_main.patch
create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch
create mode 100644 patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_alx_main.patch
delete mode 100644 patches/unified-drivers/network/0001-backport-alx/alx.patch
delete mode 100644 patches/unified-drivers/network/0003-alx-deactivate-loopback-test/alx.patch
diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/alx.patch b/patches/collateral-evolutions/network/0001-netdev_ops/alx.patch
new file mode 100644
index 0000000..46ed1fe
--- /dev/null
+++ b/patches/collateral-evolutions/network/0001-netdev_ops/alx.patch
@@ -0,0 +1,11 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -1317,7 +1317,7 @@ static int alx_probe(struct pci_dev *pde
+ goto out_free_netdev;
+ }
+
+- netdev->netdev_ops = &alx_netdev_ops;
++ netdev_attach_ops(netdev, &alx_netdev_ops);
+ SET_ETHTOOL_OPS(netdev, &alx_ethtool_ops);
+ netdev->irq = pdev->irq;
+ netdev->watchdog_timeo = ALX_WATCHDOG_TIME;
diff --git a/patches/collateral-evolutions/network/0007-pci_dev_dev_flags/INFO b/patches/collateral-evolutions/network/0007-pci_dev_dev_flags/INFO
new file mode 100644
index 0000000..fc95b61
--- /dev/null
+++ b/patches/collateral-evolutions/network/0007-pci_dev_dev_flags/INFO
@@ -0,0 +1,28 @@
+The struct pci_dev dev_flags member was added as of
+v2.6.24 via ba698ad4. This collateral evolution can be
+enhanced and backported atomically through these series
+of patches. The end goal is to optimize this in SmPL form.
+
+mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains ba698ad4
+v2.6.24-rc2~28^2~6
+
+commit ba698ad4b7e466cbb4a8bde6b9da8080ab06808d
+Author: David Miller <davem@davemloft.net>
+Date: Thu Oct 25 01:16:30 2007 -0700
+
+ PCI: Add quirk for devices which disable MSI when INTX_DISABLE is set.
+
+ A reasonably common problem with some devices is that they will
+ disable MSI generation when the INTX_DISABLE bit is set in the
+ PCI_COMMAND register.
+
+ Quirk this explicitly, guarding the pci_intx() calls in msi.c with
+ this quirk indication.
+
+ The first entries for this quirk are for 5714 and 5780 Tigon3 chips,
+ and thus we can remove the workaround code from the tg3.c driver.
+
+ Signed-off-by: David S. Miller <davem@davemloft.net>
+ Acked-by: Michael Chan <mchan@broadcom.com>
+ Acked-by: Jeff Garzik <jgarzik@redhat.com>
+ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/patches/collateral-evolutions/network/0007-pci_dev_dev_flags/alx.patch b/patches/collateral-evolutions/network/0007-pci_dev_dev_flags/alx.patch
new file mode 100644
index 0000000..aa782b7
--- /dev/null
+++ b/patches/collateral-evolutions/network/0007-pci_dev_dev_flags/alx.patch
@@ -0,0 +1,13 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -1322,8 +1322,10 @@ static int alx_probe(struct pci_dev *pde
+ netdev->irq = pdev->irq;
+ netdev->watchdog_timeo = ALX_WATCHDOG_TIME;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+ if (ent->driver_data & ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG)
+ pdev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
++#endif
+
+ err = alx_init_sw(alx);
+ if (err) {
diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_alx_main.patch b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_alx_main.patch
new file mode 100644
index 0000000..4f4cce9
--- /dev/null
+++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_alx_main.patch
@@ -0,0 +1,24 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -1590,6 +1590,8 @@ static const struct pci_error_handlers a
+ };
+
+ #ifdef CONFIG_PM_SLEEP
++compat_pci_suspend(alx_suspend);
++compat_pci_resume(alx_resume);
+ static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
+ #define ALX_PM_OPS (&alx_pm_ops)
+ #else
+@@ -1615,7 +1617,12 @@ static struct pci_driver alx_driver = {
+ .remove = alx_remove,
+ .shutdown = alx_shutdown,
+ .err_handler = &alx_err_handlers,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ .driver.pm = ALX_PM_OPS,
++#elif defined(CONFIG_PM_SLEEP)
++ .suspend = alx_suspend_compat,
++ .resume = alx_resume_compat,
++#endif
+ };
+
+ module_pci_driver(alx_driver);
diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_alx_main.patch b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_alx_main.patch
new file mode 100644
index 0000000..886bb87
--- /dev/null
+++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_alx_main.patch
@@ -0,0 +1,14 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -466,7 +466,11 @@ static void __alx_set_rx_mode(struct net
+
+ if (!(netdev->flags & IFF_ALLMULTI)) {
+ netdev_for_each_mc_addr(ha, netdev)
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ alx_add_mc_addr(hw, ha->addr, mc_hash);
++#else
++ alx_add_mc_addr(hw, ha->dmi_addr, mc_hash);
++#endif
+
+ alx_write_mem32(hw, ALX_HASH_TBL0, mc_hash[0]);
+ alx_write_mem32(hw, ALX_HASH_TBL1, mc_hash[1]);
diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch
new file mode 100644
index 0000000..35e3371
--- /dev/null
+++ b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch
@@ -0,0 +1,58 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -737,6 +737,7 @@ static int alx_init_sw(struct alx_priv *
+ }
+
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+ static netdev_features_t alx_fix_features(struct net_device *netdev,
+ netdev_features_t features)
+ {
+@@ -745,6 +746,7 @@ static netdev_features_t alx_fix_feature
+
+ return features;
+ }
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
+
+ static void alx_netif_stop(struct alx_priv *alx)
+ {
+@@ -820,7 +822,17 @@ static int alx_change_mtu(struct net_dev
+ alx->hw.mtu = mtu;
+ alx->rxbuf_size = mtu > ALX_DEF_RXBUF_SIZE ?
+ ALIGN(max_frame, 8) : ALX_DEF_RXBUF_SIZE;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
++ if (mtu > (7*1024)) {
++ netdev->features &= ~NETIF_F_TSO;
++ netdev->features &= ~NETIF_F_TSO6;
++ } else {
++ netdev->features |= NETIF_F_TSO;
++ netdev->features |= NETIF_F_TSO6;
++ }
++#else
+ netdev_update_features(netdev);
++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */
+ if (netif_running(netdev))
+ alx_reinit(alx);
+ return 0;
+@@ -1238,7 +1250,9 @@ static const struct net_device_ops alx_n
+ .ndo_change_mtu = alx_change_mtu,
+ .ndo_do_ioctl = alx_ioctl,
+ .ndo_tx_timeout = alx_tx_timeout,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+ .ndo_fix_features = alx_fix_features,
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
+ #ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = alx_poll_controller,
+ #endif
+@@ -1361,7 +1375,11 @@ static int alx_probe(struct pci_dev *pde
+ }
+ }
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+ netdev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
++#else
++ netdev->features = NETIF_F_SG | NETIF_F_HW_CSUM;
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
+
+ if (alx_get_perm_macaddr(hw, hw->perm_addr)) {
+ dev_warn(&pdev->dev,
diff --git a/patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_alx_main.patch b/patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_alx_main.patch
new file mode 100644
index 0000000..a492664
--- /dev/null
+++ b/patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_alx_main.patch
@@ -0,0 +1,13 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -499,8 +499,10 @@ static int alx_set_mac_address(struct ne
+ if (!is_valid_ether_addr(addr->sa_data))
+ return -EADDRNOTAVAIL;
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+ if (netdev->addr_assign_type & NET_ADDR_RANDOM)
+ netdev->addr_assign_type ^= NET_ADDR_RANDOM;
++#endif
+
+ memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
+ memcpy(hw->mac_addr, addr->sa_data, netdev->addr_len);
diff --git a/patches/unified-drivers/network/0001-backport-alx/alx.patch b/patches/unified-drivers/network/0001-backport-alx/alx.patch
deleted file mode 100644
index a0a9c1f..0000000
--- a/patches/unified-drivers/network/0001-backport-alx/alx.patch
+++ /dev/null
@@ -1,123 +0,0 @@
---- a/drivers/net/ethernet/atheros/alx/alx_main.c
-+++ b/drivers/net/ethernet/atheros/alx/alx_main.c
-@@ -98,7 +98,11 @@ static void __alx_set_rx_mode(struct net
-
- /* comoute mc addresses' hash value ,and put it into hash table */
- netdev_for_each_mc_addr(ha, netdev)
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
- alx_add_mc_addr(hw, ha->addr);
-+#else
-+ alx_add_mc_addr(hw, ha->dmi_addr);
-+#endif
-
- ALX_MEM_W32(hw, ALX_HASH_TBL0, hw->mc_hash[0]);
- ALX_MEM_W32(hw, ALX_HASH_TBL1, hw->mc_hash[1]);
-@@ -130,8 +134,10 @@ static int alx_set_mac_address(struct ne
- if (!is_valid_ether_addr(addr->sa_data))
- return -EADDRNOTAVAIL;
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
- if (netdev->addr_assign_type & NET_ADDR_RANDOM)
- netdev->addr_assign_type ^= NET_ADDR_RANDOM;
-+#endif
-
- memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
- memcpy(hw->mac_addr, addr->sa_data, netdev->addr_len);
-@@ -1138,6 +1144,7 @@ static void alx_set_vlan_mode(struct alx
- }
-
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
- static netdev_features_t alx_fix_features(struct net_device *netdev,
- netdev_features_t features)
- {
-@@ -1170,6 +1177,7 @@ static int alx_set_features(struct net_d
-
- return 0;
- }
-+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
-
- /* alx_change_mtu - Change the Maximum Transfer Unit */
- static int alx_change_mtu(struct net_device *netdev, int new_mtu)
-@@ -1194,7 +1202,17 @@ static int alx_change_mtu(struct net_dev
- adpt->hw.mtu = new_mtu;
- adpt->rxbuf_size = new_mtu > ALX_DEF_RXBUF_SIZE ?
- ALIGN(max_frame, 8) : ALX_DEF_RXBUF_SIZE;
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
-+ if (new_mtu > (7*1024)) {
-+ netdev->features &= ~NETIF_F_TSO;
-+ netdev->features &= ~NETIF_F_TSO6;
-+ } else {
-+ netdev->features |= NETIF_F_TSO;
-+ netdev->features |= NETIF_F_TSO6;
-+ }
-+#else
- netdev_update_features(netdev);
-+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */
- if (netif_running(netdev))
- alx_reinit(adpt, false);
- }
-@@ -2460,8 +2478,10 @@ static const struct net_device_ops alx_n
- .ndo_change_mtu = alx_change_mtu,
- .ndo_do_ioctl = alx_ioctl,
- .ndo_tx_timeout = alx_tx_timeout,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
- .ndo_fix_features = alx_fix_features,
- .ndo_set_features = alx_set_features,
-+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
- #ifdef CONFIG_NET_POLL_CONTROLLER
- .ndo_poll_controller = alx_poll_controller,
- #endif
-@@ -2563,7 +2583,7 @@ alx_probe(struct pci_dev *pdev, const st
- goto err_iomap;
- }
-
-- netdev->netdev_ops = &alx_netdev_ops;
-+ netdev_attach_ops(netdev, &alx_netdev_ops);
- alx_set_ethtool_ops(netdev);
- netdev->irq = pdev->irq;
- netdev->watchdog_timeo = ALX_WATCHDOG_TIME;
-@@ -2608,12 +2628,21 @@ alx_probe(struct pci_dev *pdev, const st
- }
- }
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
- netdev->hw_features = NETIF_F_SG |
- NETIF_F_HW_CSUM |
- NETIF_F_HW_VLAN_CTAG_RX |
- NETIF_F_TSO |
- NETIF_F_TSO6;
- netdev->features = netdev->hw_features | NETIF_F_HW_VLAN_CTAG_TX;
-+#else
-+ netdev->features = NETIF_F_SG |
-+ NETIF_F_HW_CSUM |
-+ NETIF_F_HW_VLAN_CTAG_RX |
-+ NETIF_F_TSO |
-+ NETIF_F_TSO6 |
-+ NETIF_F_HW_VLAN_CTAG_TX;
-+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
-
- /* read permanent mac addr from register or eFuse */
- if (alx_get_perm_macaddr(hw, hw->perm_addr)) {
-@@ -2789,6 +2818,8 @@ static struct pci_error_handlers alx_err
- };
-
- #ifdef CONFIG_PM_SLEEP
-+compat_pci_suspend(alx_suspend);
-+compat_pci_resume(alx_resume);
- static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
- #define ALX_PM_OPS (&alx_pm_ops)
- #else
-@@ -2802,7 +2833,12 @@ static struct pci_driver alx_driver = {
- .remove = alx_remove,
- .shutdown = alx_shutdown,
- .err_handler = &alx_err_handler,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- .driver.pm = ALX_PM_OPS,
-+#elif defined(CONFIG_PM_SLEEP)
-+ .suspend = alx_suspend_compat,
-+ .resume = alx_resume_compat,
-+#endif
- };
-
- module_pci_driver(alx_driver);
diff --git a/patches/unified-drivers/network/0003-alx-deactivate-loopback-test/alx.patch b/patches/unified-drivers/network/0003-alx-deactivate-loopback-test/alx.patch
deleted file mode 100644
index 3ed96a4..0000000
--- a/patches/unified-drivers/network/0003-alx-deactivate-loopback-test/alx.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/drivers/net/ethernet/atheros/alx/alx_ethtool.c
-+++ b/drivers/net/ethernet/atheros/alx/alx_ethtool.c
-@@ -1687,7 +1687,9 @@ static void alx_self_test(struct net_dev
- {
- struct alx_adapter *adpt = netdev_priv(netdev);
- bool if_running = netif_running(netdev);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
- bool phy_lpback = etest->flags & ETH_TEST_FL_EXTERNAL_LB;
-+#endif
-
- ALX_FLAG_SET(adpt, TESTING);
- memset(data, 0, sizeof(u64) * ALX_TEST_LEN);
-@@ -1707,10 +1709,12 @@ static void alx_self_test(struct net_dev
- if (alx_diag_interrupt(adpt, &data[2]))
- etest->flags |= ETH_TEST_FL_FAILED;
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
- if (phy_lpback)
- etest->flags |= ETH_TEST_FL_EXTERNAL_LB_DONE;
- if (alx_diag_loopback(adpt, &data[3], phy_lpback))
- etest->flags |= ETH_TEST_FL_FAILED;
-+#endif
-
- } else {
- netif_info(adpt, hw, adpt->netdev, "online test start...\n");
--
1.7.10.4
^ permalink raw reply related
* [PATCH 1/3] backports: remove alx extra patch
From: Luis R. Rodriguez @ 2013-07-01 20:55 UTC (permalink / raw)
To: backports; +Cc: linux-wireless, Luis R. Rodriguez
In-Reply-To: <1372712120-16606-1-git-send-email-mcgrof@do-not-panic.com>
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
The alx driver was upstreamed by Johannes, so this is
no longer required. Note that this driver is now GPLv2
or later, BSD folks will have to look at the old unified
tree for a permissive licensed port.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
.../network/0001-netdev_ops/mwifiex.patch | 2 +-
...drivers_net_wireless_rtlwifi_rtl8192cu_sw.patch | 2 +-
.../network/0002-alx-make-kconfig/alx.patch | 32 --------------------
3 files changed, 2 insertions(+), 34 deletions(-)
delete mode 100644 patches/unified-drivers/network/0002-alx-make-kconfig/alx.patch
diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/mwifiex.patch b/patches/collateral-evolutions/network/0001-netdev_ops/mwifiex.patch
index 0567191..58a38ab 100644
--- a/patches/collateral-evolutions/network/0001-netdev_ops/mwifiex.patch
+++ b/patches/collateral-evolutions/network/0001-netdev_ops/mwifiex.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
-@@ -750,7 +750,7 @@ static const struct net_device_ops mwifi
+@@ -749,7 +749,7 @@ static const struct net_device_ops mwifi
void mwifiex_init_priv_params(struct mwifiex_private *priv,
struct net_device *dev)
{
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtlwifi_rtl8192cu_sw.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtlwifi_rtl8192cu_sw.patch
index 28b2173..23181a0 100644
--- a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtlwifi_rtl8192cu_sw.patch
+++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtlwifi_rtl8192cu_sw.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
-@@ -385,7 +385,9 @@ static struct usb_driver rtl8192cu_drive
+@@ -386,7 +386,9 @@ static struct usb_driver rtl8192cu_drive
#ifdef CONFIG_AUTOSUSPEND
.supports_autosuspend = 1,
#endif
diff --git a/patches/unified-drivers/network/0002-alx-make-kconfig/alx.patch b/patches/unified-drivers/network/0002-alx-make-kconfig/alx.patch
deleted file mode 100644
index 465e499..0000000
--- a/patches/unified-drivers/network/0002-alx-make-kconfig/alx.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/drivers/net/ethernet/atheros/Kconfig
-+++ b/drivers/net/ethernet/atheros/Kconfig
-@@ -67,4 +67,22 @@ config ATL1C
- To compile this driver as a module, choose M here. The module
- will be called atl1c.
-
-+config ALX
-+ tristate "Qualcomm Atheros L1F Gigabit Ethernet support"
-+ depends on PCI
-+ select CRC32
-+ select NET_CORE
-+ select MII
-+ ---help---
-+ This driver supports the Qualcomm Atheros L1F ethernet adapter.
-+ This driver supports following chipsets:
-+
-+ 1969:1091 - AR8161 Gigabit Ethernet
-+ 1969:1090 - AR8162 Fast Ethernet
-+ 1969:10A1 - AR8171 Gigabit Ethernet
-+ 1969:10A0 - AR8172 Fast Ethernet
-+
-+ To compile this driver as a module, choose M here. The module
-+ will be called alx.
-+
- endif # NET_VENDOR_ATHEROS
---- a/drivers/net/ethernet/atheros/Makefile
-+++ b/drivers/net/ethernet/atheros/Makefile
-@@ -6,3 +6,4 @@ obj-$(CONFIG_ATL1) += atlx/
- obj-$(CONFIG_ATL2) += atlx/
- obj-$(CONFIG_ATL1E) += atl1e/
- obj-$(CONFIG_ATL1C) += atl1c/
-+obj-$(CONFIG_ALX) += alx/
--
1.7.10.4
^ permalink raw reply related
* [PATCH 0/3] backports: backport alx
From: Luis R. Rodriguez @ 2013-07-01 20:55 UTC (permalink / raw)
To: backports; +Cc: linux-wireless, Luis R. Rodriguez
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Johannes threw alx upstream, this fixes the backport based on
the new shiny code.
Luis R. Rodriguez (3):
backports: remove alx extra patch
backports: add new alx upstream backport
backports: add SPEED_UNKNOWN and DUPLEX_UNKNOWN
backport/backport-include/linux/ethtool.h | 8 ++
.../network/0001-netdev_ops/alx.patch | 11 ++
.../network/0001-netdev_ops/mwifiex.patch | 2 +-
.../network/0007-pci_dev_dev_flags/INFO | 28 +++++
.../network/0007-pci_dev_dev_flags/alx.patch | 13 +++
.../drivers_net_ethernet_atheros_alx_main.patch | 24 ++++
.../drivers_net_ethernet_atheros_alx_main.patch | 14 +++
.../drivers_net_ethernet_atheros_alx_main.patch | 58 +++++++++
.../drivers_net_ethernet_atheros_alx_main.patch | 13 +++
...drivers_net_wireless_rtlwifi_rtl8192cu_sw.patch | 2 +-
.../network/0001-backport-alx/alx.patch | 123 --------------------
.../network/0002-alx-make-kconfig/alx.patch | 32 -----
.../0003-alx-deactivate-loopback-test/alx.patch | 25 ----
13 files changed, 171 insertions(+), 182 deletions(-)
create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/alx.patch
create mode 100644 patches/collateral-evolutions/network/0007-pci_dev_dev_flags/INFO
create mode 100644 patches/collateral-evolutions/network/0007-pci_dev_dev_flags/alx.patch
create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_alx_main.patch
create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_alx_main.patch
create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch
create mode 100644 patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_alx_main.patch
delete mode 100644 patches/unified-drivers/network/0001-backport-alx/alx.patch
delete mode 100644 patches/unified-drivers/network/0002-alx-make-kconfig/alx.patch
delete mode 100644 patches/unified-drivers/network/0003-alx-deactivate-loopback-test/alx.patch
--
1.7.10.4
^ permalink raw reply
* Re: [RFC] wlcore: sdio: add wilink clock providers
From: Felipe Balbi @ 2013-07-01 20:46 UTC (permalink / raw)
To: Luciano Coelho
Cc: mturquette, mark.rutland, balbi, grant.likely, rob.herring,
devicetree-discuss, --linux-doc, linux-kernel, linux-omap,
linux-wireless, linux-arm-kernel
In-Reply-To: <1372707250-11998-1-git-send-email-coelho@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]
Hi,
On Mon, Jul 01, 2013 at 10:34:10PM +0300, Luciano Coelho wrote:
> diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
> index 670c3ce..7f061b8 100644
> --- a/arch/arm/boot/dts/omap4-panda-common.dtsi
> +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
> @@ -65,11 +65,19 @@
> enable-active-high;
> };
>
> +
> wlan {
> - compatible = "ti,wilink6";
> - interrupt-parent = <&gpio2>;
> - interrupts = <21 0x4>; /* gpio line 53, high level triggered */
> - refclock = <2>; /* 38.4 MHz */
> + compatible = "ti,wilink6";
> + interrupt-parent = <&gpio2>;
> + interrupts = <21 0x4>; /* gpio line 53, high level triggered */
> + clocks = <&refclock>;
> + clock-names = "refclock";
hmmm, shouldn't you provide both clocks (refclock and tcx0clock)
explicitly here ?
Also, you should probably make it clear that the WiLink module is fed by
the 32K sync clock just to make sure clock usecounts are correctly
incremented ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* [PATCH] ath9k_htc: fix data race between request_firmware_nowait() callback and suspend()
From: Alexey Khoroshilov @ 2013-07-01 20:43 UTC (permalink / raw)
To: Luis R. Rodriguez, Jouni Malinen, Vasanthakumar Thiagarajan,
Senthil Balasubramanian
Cc: Alexey Khoroshilov, John W. Linville, linux-wireless, ath9k-devel,
linux-kernel, ldv-project
ath9k_hif_usb_probe() requests firmware asynchronically and
there is some initialization postponed till firmware is ready.
In particular, ath9k_hif_usb_firmware_cb() callback initializes
hif_dev->tx.tx_buf and hif_dev->tx.tx_pending lists.
At the same time, ath9k_hif_usb_suspend() iterates that lists through
ath9k_hif_usb_dealloc_urbs(). If suspend happens before request_firmware_nowait()
callback is called, it can lead to oops.
Similar issue could be in ath9k_hif_usb_disconnect(), but it is prevented
using hif_dev->fw_done completion and HIF_USB_READY flag. The patch extends
this approach to suspend() as well.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
drivers/net/wireless/ath/ath9k/hif_usb.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index f5dda84..fcd9aa5 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -1076,7 +1076,7 @@ static void ath9k_hif_usb_firmware_fail(struct hif_device_usb *hif_dev)
struct device *dev = &hif_dev->udev->dev;
struct device *parent = dev->parent;
- complete(&hif_dev->fw_done);
+ complete_all(&hif_dev->fw_done);
if (parent)
device_lock(parent);
@@ -1125,7 +1125,7 @@ static void ath9k_hif_usb_firmware_cb(const struct firmware *fw, void *context)
release_firmware(fw);
hif_dev->flags |= HIF_USB_READY;
- complete(&hif_dev->fw_done);
+ complete_all(&hif_dev->fw_done);
return;
@@ -1310,7 +1310,10 @@ static int ath9k_hif_usb_suspend(struct usb_interface *interface,
if (!(hif_dev->flags & HIF_USB_START))
ath9k_htc_suspend(hif_dev->htc_handle);
- ath9k_hif_usb_dealloc_urbs(hif_dev);
+ wait_for_completion(&hif_dev->fw_done);
+
+ if (hif_dev->flags & HIF_USB_READY)
+ ath9k_hif_usb_dealloc_urbs(hif_dev);
return 0;
}
--
1.8.1.2
^ permalink raw reply related
* Re: pull request: wireless-next 2013-06-28
From: David Miller @ 2013-07-01 20:22 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20130628174000.GC30328@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Fri, 28 Jun 2013 13:40:00 -0400
> Yet one more pull request for wireless updates intended for 3.11...
...
> git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem
Pulled, thanks John.
^ permalink raw reply
* merge window is CLOSED
From: David Miller @ 2013-07-01 20:14 UTC (permalink / raw)
To: netdev; +Cc: linux-wireless, netfilter-devel
With the 3.10 release, the merge window is closed.
If it's not a bug fix, and it isn't in patchwork right now, I
don't want to see it until net-next is openned again.
Thanks.
^ permalink raw reply
* [RFC] wlcore: sdio: add wilink clock providers
From: Luciano Coelho @ 2013-07-01 19:34 UTC (permalink / raw)
To: mturquette, mark.rutland, balbi
Cc: grant.likely, rob.herring, devicetree-discuss, --linux-doc,
linux-kernel, linux-omap, linux-wireless, linux-arm-kernel
Add refclock and tcxoclock as clock providers in WiLink. These clocks
are not accesible outside the WiLink module, but they are registered
in the clock framework anyway. Only the WiLink chip consumes these
clocks.
In theory, the WiLink chip could be connected to external clocks
instead of using these internal clocks, so make the clock consumer
code generic enough. If external clocks are used, then the internal
clock device tree nodes are not necessary, but the external ones must
be specified.
Signed-off-by: Luciano Coelho <coelho@ti.com>
---
Hi,
I came up with this code, trying to make the WiLink clocks definitions
as generic as possible and use existing fixed-clock bindings. This
looks relatively clean to me, even though it adds some complexity.
But I think it's better than the original bindings I had defined.
I still need to take care of the XTAL/not-XTAl boolean, but I will do
that separately.
This patch will be split (to take away the Panda DTS part) and
squashed in other patches in my series.
Please let me know what you think.
--
Cheers,
Luca.
arch/arm/boot/dts/omap4-panda-common.dtsi | 16 ++++++++---
drivers/net/wireless/ti/wlcore/sdio.c | 43 ++++++++++++++++++++++++++---
2 files changed, 51 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 670c3ce..7f061b8 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -65,11 +65,19 @@
enable-active-high;
};
+
wlan {
- compatible = "ti,wilink6";
- interrupt-parent = <&gpio2>;
- interrupts = <21 0x4>; /* gpio line 53, high level triggered */
- refclock = <2>; /* 38.4 MHz */
+ compatible = "ti,wilink6";
+ interrupt-parent = <&gpio2>;
+ interrupts = <21 0x4>; /* gpio line 53, high level triggered */
+ clocks = <&refclock>;
+ clock-names = "refclock";
+
+ refclock: refclock {
+ compatible = "ti,wilink-clock";
+ #clock-cells = <0>;
+ clock-frequency = <38400000>;
+ };
};
};
diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index 5b08620..60fce49 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -34,6 +34,7 @@
#include <linux/wl12xx.h>
#include <linux/pm_runtime.h>
#include <linux/printk.h>
+#include <linux/clk-provider.h>
#include "wlcore.h"
#include "wl12xx_80211.h"
@@ -52,6 +53,7 @@ static bool dump = false;
struct wl12xx_sdio_glue {
struct device *dev;
struct platform_device *core;
+ struct clk *refclock, *tcxoclock;
};
static const struct sdio_device_id wl1271_devices[] = {
@@ -214,10 +216,16 @@ static struct wl1271_if_operations sdio_ops = {
.set_block_size = wl1271_sdio_set_block_size,
};
+static const struct of_device_id wlcore_sdio_of_clk_match_table[] = {
+ { .compatible = "ti,wilink-clock" },
+};
+
static struct wl12xx_platform_data *wlcore_get_pdata_from_of(struct device *dev)
{
struct wl12xx_platform_data *pdata;
struct device_node *np = dev->of_node;
+ struct device_node *clock_node;
+ struct wl12xx_sdio_glue *glue = sdio_get_drvdata(dev_to_sdio_func(dev));
if (!np) {
np = of_find_matching_node(NULL, dev->driver->of_match_table);
@@ -241,11 +249,28 @@ static struct wl12xx_platform_data *wlcore_get_pdata_from_of(struct device *dev)
goto out_free;
}
+ for_each_matching_node(clock_node, wlcore_sdio_of_clk_match_table)
+ of_fixed_clk_setup(clock_node);
+
/* TODO: make sure we have this when needed (ie. for WL6 and WL7) */
- of_property_read_u32(np, "refclock", &pdata->ref_clock_freq);
+ glue->refclock = of_clk_get_by_name(np, "refclock");
+ if (IS_ERR(glue->refclock)) {
+ dev_err(dev, "couldn't find refclock on the device tree\n");
+ glue->refclock = NULL;
+ } else {
+ clk_prepare_enable(glue->refclock);
+ pdata->ref_clock_freq = clk_get_rate(glue->refclock);
+ }
/* TODO: make sure we have this when needed (ie. for WL7) */
- of_property_read_u32(np, "tcxoclock", &pdata->tcxo_clock_freq);
+ glue->tcxoclock = of_clk_get_by_name(np, "tcxoclock");
+ if (IS_ERR(glue->tcxoclock)) {
+ dev_err(dev, "couldn't find tcxoclock on the device tree\n");
+ glue->tcxoclock = NULL;
+ } else {
+ clk_prepare_enable(glue->tcxoclock);
+ pdata->ref_clock_freq = clk_get_rate(glue->tcxoclock);
+ }
goto out;
@@ -291,6 +316,8 @@ static int wl1271_probe(struct sdio_func *func,
/* Use block mode for transferring over one block size of data */
func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
+ sdio_set_drvdata(func, glue);
+
/* The pdata allocated here is freed when the device is freed,
* so we don't need an additional out label to free it in case
* of error further on.
@@ -316,8 +343,6 @@ static int wl1271_probe(struct sdio_func *func,
if (mmcflags & MMC_PM_KEEP_POWER)
pdev_data->pwr_in_suspend = true;
- sdio_set_drvdata(func, glue);
-
/* Tell PM core that we don't need the card to be powered now */
pm_runtime_put_noidle(&func->dev);
@@ -384,6 +409,16 @@ static void wl1271_remove(struct sdio_func *func)
{
struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func);
+ if (glue->refclock) {
+ clk_disable_unprepare(glue->refclock);
+ clk_put(glue->refclock);
+ }
+
+ if (glue->tcxoclock) {
+ clk_disable_unprepare(glue->tcxoclock);
+ clk_put(glue->tcxoclock);
+ }
+
/* Undo decrement done above in wl1271_probe */
pm_runtime_get_noresume(&func->dev);
--
1.7.10.4
^ permalink raw reply related
* RE: [PATCH 1/1] mwifiex: add tx info to skb when forming mgmt frame
From: Bing Zhao @ 2013-07-01 19:34 UTC (permalink / raw)
To: Harvey Yang
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Avinash Patil, Stone Piao
In-Reply-To: <1372671230-8733-1-git-send-email-harvey.huawei.yang@gmail.com>
Hi Harvey,
Thanks for your patch.
> From: Huawei Yang <harvey.huawei.yang@gmail.com>
>
> In function 'mwifiex_write_data_complete' it need tx info to find the mwifiex_private to updates
> statistics and wake up tx queues. Or we may trigger tx queues timeout when transmitting lots of mgmt
> frames burstly.
Please shorten the commit log to less than 68 characters per line.
>
> Signed-off-by: Huawei Yang <harvey.huawei.yang@gmail.com>
> ---
> drivers/net/wireless/mwifiex/cfg80211.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
> index e42b266..e8655f9 100644
> --- a/drivers/net/wireless/mwifiex/cfg80211.c
> +++ b/drivers/net/wireless/mwifiex/cfg80211.c
> @@ -166,6 +166,10 @@ mwifiex_form_mgmt_frame(struct sk_buff *skb, const u8 *buf, size_t len)
> memcpy(skb_put(skb, len - sizeof(struct ieee80211_hdr_3addr)),
> buf + sizeof(struct ieee80211_hdr_3addr),
> len - sizeof(struct ieee80211_hdr_3addr));
> +
> + tx_info = MWIFIEX_SKB_TXCB(skb);
> + tx_info->bss_num = priv->bss_num;
> + tx_info->bss_type = priv->bss_type;
This code doesn't compile because both tx_info and priv are undefined in this function.
Perhaps you meant to add it in mwifiex_cfg80211_mgmt_tx() instead?
@@ -216,6 +216,10 @@ mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wirele
return -ENOMEM;
}
+ tx_info = MWIFIEX_SKB_TXCB(skb);
+ tx_info->bss_num = priv->bss_num;
+ tx_info->bss_type = priv->bss_type;
+
mwifiex_form_mgmt_frame(skb, buf, len);
mwifiex_queue_tx_pkt(priv, skb);
>
> skb->priority = LOW_PRIO_TID;
> do_gettimeofday(&tv);
Thanks,
Bing
^ permalink raw reply
* Re: [PATCH 00/19] rt2x00: add experimental support for RT3593
From: Andreas Hartmann @ 2013-07-01 15:20 UTC (permalink / raw)
To: Gabor Juhos; +Cc: John Linville, linux-wireless, users
In-Reply-To: <51D173EA.9030803@openwrt.org>
Hello Gabor,
Gabor Juhos wrote:
> Hi Andreas,
>
>> bad guy is back again :-)
>
> :)
>
>>
>> Gabor Juhos wrote:
>>> This patch-set implements experiemental support for the
>>> RT3593 chipset. The patches are tested on the Linksys
>>> AE3000 USB device only, however other USB devices which
>>> are using the RT3573 chips might work as well.
>>
>> I did another test with raspberry pi. Same network parameters (2.4 GHz,
>> 40MHz, eap-tls, ccmp/ccmp) but this time w/o any other load on the
>> wlan. But there is a reinforced-concrete floor between AP and STA.
>>
>> netperf with rt2800usb / backports-20130617 / kernel 3.6.11 gives:
>>
>> MIGRATED TCP STREAM TEST from 0.0.0.0 () port 0 AF_INET to server port 0 AF_INET
>> Recv Send Send
>> Socket Socket Message Elapsed
>> Size Size Size Time Throughput
>> bytes bytes bytes secs. 10^6bits/sec
>>
>> 87380 16384 16384 10.39 28.16
>> MIGRATED TCP MAERTS TEST from 0.0.0.0 () port 0 AF_INET from server port 0 AF_INET
>> Recv Send Send
>> Socket Socket Message Elapsed
>> Size Size Size Time Throughput
>> bytes bytes bytes secs. 10^6bits/sec
>>
>> 87380 16384 16384 10.00 30.23
>> TCP SENDFILE TEST from 0.0.0.0 () port 0 AF_INET to server port 0 AF_INET
>> Recv Send Send
>> Socket Socket Message Elapsed
>> Size Size Size Time Throughput
>> bytes bytes bytes secs. 10^6bits/sec
>>
>> 87380 16384 16384 10.35 27.69
>>
>>
>> Same with DPO_RT5572_LinuxSTA_2.6.1.3_20121022
>>
>> MIGRATED TCP STREAM TEST from 0.0.0.0 () port 0 AF_INET to server port 0 AF_INET
>> Recv Send Send
>> Socket Socket Message Elapsed
>> Size Size Size Time Throughput
>> bytes bytes bytes secs. 10^6bits/sec
>>
>> 87380 16384 16384 10.01 97.95
>> MIGRATED TCP MAERTS TEST from 0.0.0.0 () port 0 AF_INET from server port 0 AF_INET
>> Recv Send Send
>> Socket Socket Message Elapsed
>> Size Size Size Time Throughput
>> bytes bytes bytes secs. 10^6bits/sec
>>
>> 87380 16384 16384 10.01 121.69
>> TCP SENDFILE TEST from 0.0.0.0 () port 0 AF_INET to server port 0 AF_INET
>> Recv Send Send
>> Socket Socket Message Elapsed
>> Size Size Size Time Throughput
>> bytes bytes bytes secs. 10^6bits/sec
>>
>> 87380 16384 16384 10.01 82.75
>>
>> If you compare the result w/ rt2800usb/AE3000 with rt2800usb/rt3572[1]
>> you can see: no difference :-(.
>
> These results with the rt2800usb driver are quite bad. I don't yet have an idea
> what causes the huge performance loss on that platform.
One reason, from my point of view the main reason:
The rt2800usb driver causes to much interrupts (bad USB-handling). The
vendor driver uses a few interrupts with big data portions, rt2800usb
does it vice versa: small packets, but a lot more (1500 (14 Mbit/s) :
24.000 (9Mbit/s)).
See: http://article.gmane.org/gmane.linux.drivers.rt2x00.user/615
On systems with enough cpu resources, this problem doesn't hit that much
(but even there). But on all other systems, you're getting more or less
problems: all the more problems as worse the CPU resources get.
That's why rt5572sta performs mostly fine even with raspberry pi from my
point of view (besides the optimized rate control of the vendor driver).
Regards,
Andreas
^ permalink raw reply
* [wireless-regdb] What about 80 and 160 MHz channels? (was: Update regulatory rules for Russia (RU) on 5GHz)
From: Bjørn Mork @ 2013-07-01 14:47 UTC (permalink / raw)
To: Роман А. aka BasicXP
Cc: wireless-regdb@lists.infradead.org, linux-wireless
In-Reply-To: <26561339160385@web1g.yandex.ru>
Роман А. aka BasicXP <x12ozmouse@ya.ru> writes:
> Please abort, the info seems to be outdated.
>
>
>
> Please update the regulatory rules for Russia (RU) on 5GHz to be the following:
>
> (5170 - 5350 @ 40), (N/A, 20)
> (5650 - 5835 @ 40), (N/A, 30)
>
> i.e. channels 34-64 can be used in either 20MHz or 40MHz modes
> with maximum power of 20dBm (-10 dBW), and channels 132-165 can be
> used in either 20MHz or 40MHz modes with maximum power of 30dBm (0
> dBW).
>
> Information is taken from the official document available
> here: http://www.rfs-rf.ru/idc/groups/public/documents/grhc_native_files/005571.doc
Which doesn't seem to restrict the channel width, does it? 802.11ac
cards and APs are on the market. I wonder if it is time to start
changing all those unnecessary 40 MHz limits?
At least for Europe, the norm seems to be limits on total power and
power density within the allowed bands, but no actual channel width
restrictions. Any channel is OK as long as the you stay within the
other limits.
Or do I misread the regulations?
Using 802.11ac 80MHz channels *anywhere* seems to require overriding the
regdb at the moment, which can't be right? Googling leads to some
patches like this one:
http://lists.infradead.org/pipermail/wireless-regdb/2013-April/000153.html
but nothing which has been applied.
Given that most of the current 40 MHz restrictions are just invented to
fit into the database, isn't a bulk update appropriate?
Bjørn
^ permalink raw reply
* Re: [PATCH] Documentation: dt: bindings: TI WiLink modules
From: Luciano Coelho @ 2013-07-01 12:39 UTC (permalink / raw)
To: mturquette, Mark Rutland
Cc: balbi, grant.likely@linaro.org, rob.herring@calxeda.com,
devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
linux-wireless@vger.kernel.org, linux-arm@vger.kernel.org
In-Reply-To: <1372425670.21065.61.camel@cumari.coelho.fi>
On Fri, 2013-06-28 at 16:21 +0300, Luciano Coelho wrote:
> On Fri, 2013-06-28 at 15:18 +0300, Felipe Balbi wrote:
> > On Fri, Jun 28, 2013 at 03:13:52PM +0300, Luciano Coelho wrote:
> > > On Fri, 2013-06-28 at 14:41 +0300, Felipe Balbi wrote:
> > > > On Fri, Jun 28, 2013 at 02:22:11PM +0300, Luciano Coelho wrote:
> > > > > On Fri, 2013-06-28 at 13:31 +0300, Luciano Coelho wrote:
> > > > > > (fixed Mike's address)
> > > > > >
> > > > > > On Fri, 2013-06-28 at 11:21 +0100, Mark Rutland wrote:
> > > > > > > On Fri, Jun 28, 2013 at 10:53:35AM +0100, Luciano Coelho wrote:
> > > > > > > > On Fri, 2013-06-28 at 10:38 +0100, Mark Rutland wrote:
> > > > > > > > > On Tue, Jun 25, 2013 at 09:35:30AM +0100, Luciano Coelho wrote:
> > > > > > > > > > +Optional properties:
> > > > > > > > > > +--------------------
> > > > > > > > > > +
> > > > > > > > > > +- refclock: the internal WLAN reference clock frequency (required for
> > > > > > > > > > + WiLink6 and WiLink7; not used for WiLink8). Must be one of the
> > > > > > > > > > + following:
> > > > > > > > > > + 0 = 19.2 MHz
> > > > > > > > > > + 1 = 26.0 MHz
> > > > > > > > > > + 2 = 38.4 MHz
> > > > > > > > > > + 3 = 52.0 MHz
> > > > > > > > > > + 4 = 38.4 MHz, XTAL
> > > > > > > > > > + 5 = 26.0 MHz, XTAL
> > > > > > > > > > +
> > > > > > > > > > +- tcxoclock: the internal WLAN TCXO clock frequency (required for
> > > > > > > > > > + WiLink7 not used for WiLink6 and WiLink8). Must be one of the
> > > > > > > > > > + following:
> > > > > > > > > > + 0 = 19.200 MHz
> > > > > > > > > > + 1 = 26.000 MHz
> > > > > > > > > > + 2 = 38.400 MHz
> > > > > > > > > > + 3 = 52.000 MHz
> > > > > > > > > > + 4 = 16.368 MHz
> > > > > > > > > > + 5 = 32.736 MHz
> > > > > > > > > > + 6 = 16.800 MHz
> > > > > > > > > > + 7 = 33.600 MHz
> > > > > > > > >
> > > > > > > > > This looks suspiciously like what we have the common clock bindings for:
> > > > > > > > >
> > > > > > > > > refclk {
> > > > > > > > > compatible = "fixed-clock";
> > > > > > > > > #clock-cells = <0>;
> > > > > > > > > clock-frequency = <19200000>;
> > > > > > > > > }
> > > > > > > > >
> > > > > > > > > wilink {
> > > > > > > > > compatible = "ti,wilink7";
> > > > > > > > > interrupt-parent = <&some_interrupt_controller>;
> > > > > > > > > interrupts = <0 1 1>;
> > > > > > > > > clocks = <&refclk>, <&refclk>;
> > > > > > > > > clock-names = "refclk", "txoclk";
> > > > > > > > > };
> > > > > > > > >
> > > > > > > > > Could you not use them?
> > > > > > > >
> > > > > > > > Hmmm... this actually does look good. But these are internal clocks in
> > > > > > > > the modules, they cannot be accessed from outside. Does it make sense
> > > > > > > > to register them with the clock framework?
> > > > > > >
> > > > > > > Given we already have a common way of describing clocks, I think it
> > > > > > > makes sense to use it -- people already understand the common bindings,
> > > > > > > and it's less code to add add to the kernel. I don't think the fact
> > > > > > > these clocks are internal should prevent us from describing them as we
> > > > > > > would an external clock.
> > > > > >
> > > > > > Yes, I agree with you. Thanks for the suggestion! I think it will look
> > > > > > much better. And now that I dug a bit more into the code, I can see
> > > > > > that there are only structs being populated, so there shouldn't be any
> > > > > > other side-effects.
> > > > >
> > > > > Hmmm, one thing that escaped me. Besides the frequency, I also need a
> > > > > boolean that tells if the clock is XTAL or not. I can't figure out how
> > > > > to pass this if I use the generic clock framework. Any suggestions?
> > > >
> > > > Could you use clock-output-names for that ?
> > > >
> > > > XTAL clock:
> > > >
> > > > refclk {
> > > > compatible = "fixed-clock";
> > > > #clock cells = <0>;
> > > > clock-frequency = <19200000>;
> > > > clock-output-names = "xtal";
> > > > };
> > > >
> > > > non-XTAL clock:
> > > >
> > > > refclk {
> > > > compatible = "fixed-clock";
> > > > #clock cells = <0>;
> > > > clock-frequency = <19200000>;
> > > > clock-output-names = "osc"; /* any better name ? */
> > > > };
> > >
> > > This starts looking a bit hacky. Using the output name as a flag is not
> > > very pretty.
> > >
> > > I think it would be better to have a separate flag for it in the wlan
> > > node. Like an optional "refclock-xtal" boolean or something. The
> > > downside of this is that we would be adding information about the clock
> > > details in the wilink node. :(
> > >
> > > OTOH, we could add a flag to the generic clock binding? A new optional
> > > boolean that tells whether the clock is XTAL or not:
> > >
> > > refclk {
> > > compatible = "fixed-clock";
> > > #clock cells = <0>;
> > > clock-frequency = <19200000>;
> > > clock-xtal;
> > > };
> > >
> > > Do you think that would make sense?
> >
> > sure, that looks alright to me. Surely there are other devices out there
> > who want to know if the clock comes from a crystal or not ?!?
>
> Mike, what do you think about this idea? If it sounds okay to you, I can
> cook up a patch adding this flag.
Hmmm... I started implementing this whole thing, but using these clocks
as "fixed-clock"s is not so straightforward. The problem is that I
would need to register my driver as a clock provider and add the OF
match for "fixed-clock".
If I do that, all the other "fixed-clock" nodes would be passed to my
driver too, which is wrong. Or, the platform should register the
"fixed-clock" match, but this would be wrong too, since it would find
*my* fixed-clocks.
The only thing I can come up with is to make a small clock driver (maybe
even inside the WiLink module itself) that registers a new type of
clock, "ti,wilink-clock" or something. But this would really be
overkill, wouldn't it?
Any other ideas?
--
Luca.
^ permalink raw reply
* Re: [PATCH 00/19] rt2x00: add experimental support for RT3593
From: Gabor Juhos @ 2013-07-01 12:19 UTC (permalink / raw)
To: Andreas Hartmann; +Cc: John Linville, linux-wireless, users
In-Reply-To: <20130630105930.7f53165a@dualc.maya.org>
Hi Andreas,
> bad guy is back again :-)
:)
>
> Gabor Juhos wrote:
>> This patch-set implements experiemental support for the
>> RT3593 chipset. The patches are tested on the Linksys
>> AE3000 USB device only, however other USB devices which
>> are using the RT3573 chips might work as well.
>
> I did another test with raspberry pi. Same network parameters (2.4 GHz,
> 40MHz, eap-tls, ccmp/ccmp) but this time w/o any other load on the
> wlan. But there is a reinforced-concrete floor between AP and STA.
>
> netperf with rt2800usb / backports-20130617 / kernel 3.6.11 gives:
>
> MIGRATED TCP STREAM TEST from 0.0.0.0 () port 0 AF_INET to server port 0 AF_INET
> Recv Send Send
> Socket Socket Message Elapsed
> Size Size Size Time Throughput
> bytes bytes bytes secs. 10^6bits/sec
>
> 87380 16384 16384 10.39 28.16
> MIGRATED TCP MAERTS TEST from 0.0.0.0 () port 0 AF_INET from server port 0 AF_INET
> Recv Send Send
> Socket Socket Message Elapsed
> Size Size Size Time Throughput
> bytes bytes bytes secs. 10^6bits/sec
>
> 87380 16384 16384 10.00 30.23
> TCP SENDFILE TEST from 0.0.0.0 () port 0 AF_INET to server port 0 AF_INET
> Recv Send Send
> Socket Socket Message Elapsed
> Size Size Size Time Throughput
> bytes bytes bytes secs. 10^6bits/sec
>
> 87380 16384 16384 10.35 27.69
>
>
> Same with DPO_RT5572_LinuxSTA_2.6.1.3_20121022
>
> MIGRATED TCP STREAM TEST from 0.0.0.0 () port 0 AF_INET to server port 0 AF_INET
> Recv Send Send
> Socket Socket Message Elapsed
> Size Size Size Time Throughput
> bytes bytes bytes secs. 10^6bits/sec
>
> 87380 16384 16384 10.01 97.95
> MIGRATED TCP MAERTS TEST from 0.0.0.0 () port 0 AF_INET from server port 0 AF_INET
> Recv Send Send
> Socket Socket Message Elapsed
> Size Size Size Time Throughput
> bytes bytes bytes secs. 10^6bits/sec
>
> 87380 16384 16384 10.01 121.69
> TCP SENDFILE TEST from 0.0.0.0 () port 0 AF_INET to server port 0 AF_INET
> Recv Send Send
> Socket Socket Message Elapsed
> Size Size Size Time Throughput
> bytes bytes bytes secs. 10^6bits/sec
>
> 87380 16384 16384 10.01 82.75
>
> If you compare the result w/ rt2800usb/AE3000 with rt2800usb/rt3572[1]
> you can see: no difference :-(.
These results with the rt2800usb driver are quite bad. I don't yet have an idea
what causes the huge performance loss on that platform.
Although I don't have a Raspberry Pi nor any RT3572 based USB device, but I can
test the AE3000 on a few different embedded platforms. I will do some
performance tests on those once I have fixed the AP mode support for the RT3593.
-Gabor
^ permalink raw reply
* [PATCH] iwl4965: better skb management in rx path
From: Stanislaw Gruszka @ 2013-07-01 12:19 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Eric Dumazet
4965 version of Eric patch "iwl3945: better skb management in rx path".
It fixes several problems :
1) skb->truesize is underestimated.
We really consume PAGE_SIZE bytes for a fragment,
not the frame length.
2) 128 bytes of initial headroom is a bit low and forces reallocations.
3) We can avoid consuming a full page for small enough frames.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/net/wireless/iwlegacy/4965-mac.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index d287fd2..4e5d408 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -574,9 +574,11 @@ il4965_translate_rx_status(struct il_priv *il, u32 decrypt_in)
return decrypt_out;
}
+#define SMALL_PACKET_SIZE 256
+
static void
il4965_pass_packet_to_mac80211(struct il_priv *il, struct ieee80211_hdr *hdr,
- u16 len, u32 ampdu_status, struct il_rx_buf *rxb,
+ u32 len, u32 ampdu_status, struct il_rx_buf *rxb,
struct ieee80211_rx_status *stats)
{
struct sk_buff *skb;
@@ -598,21 +600,25 @@ il4965_pass_packet_to_mac80211(struct il_priv *il, struct ieee80211_hdr *hdr,
il_set_decrypted_flag(il, hdr, ampdu_status, stats))
return;
- skb = dev_alloc_skb(128);
+ skb = dev_alloc_skb(SMALL_PACKET_SIZE);
if (!skb) {
IL_ERR("dev_alloc_skb failed\n");
return;
}
- skb_add_rx_frag(skb, 0, rxb->page, (void *)hdr - rxb_addr(rxb), len,
- len);
+ if (len <= SMALL_PACKET_SIZE) {
+ memcpy(skb_put(skb, len), hdr, len);
+ } else {
+ skb_add_rx_frag(skb, 0, rxb->page, (void *)hdr - rxb_addr(rxb),
+ len, PAGE_SIZE << il->hw_params.rx_page_order);
+ il->alloc_rxb_page--;
+ rxb->page = NULL;
+ }
il_update_stats(il, false, fc, len);
memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats));
ieee80211_rx(il->hw, skb);
- il->alloc_rxb_page--;
- rxb->page = NULL;
}
/* Called for N_RX (legacy ABG frames), or
--
1.7.11.7
^ permalink raw reply related
* Re: [PATCH v3] iwl3945: better skb management in rx path
From: Stanislaw Gruszka @ 2013-07-01 12:15 UTC (permalink / raw)
To: Eric Dumazet
Cc: Paul Stewart, John W. Linville, Steinar H. Gunderson,
linux-wireless, netdev
In-Reply-To: <1372431906.3301.283.camel@edumazet-glaptop>
On Fri, Jun 28, 2013 at 08:05:06AM -0700, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> Steinar reported reallocations of skb->head with IPv6, leading to
> a warning in skb_try_coalesce()
>
> It turns out iwl3945 has several problems :
>
> 1) skb->truesize is underestimated.
> We really consume PAGE_SIZE bytes for a fragment,
> not the frame length.
> 2) 128 bytes of initial headroom is a bit low and forces reallocations.
> 3) We can avoid consuming a full page for small enough frames.
>
> Reported-by: Steinar H. Gunderson <sesse@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Paul Stewart <pstew@google.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
FYI, I'll post 4965 version soon.
^ permalink raw reply
* [PATCH 1/1] mwifiex: add tx info to skb when forming mgmt frame
From: Harvey Yang @ 2013-07-01 9:33 UTC (permalink / raw)
To: Bing Zhao; +Cc: linux-wireless, linux-kernel, Huawei Yang
From: Huawei Yang <harvey.huawei.yang@gmail.com>
In function 'mwifiex_write_data_complete' it need tx info to find the mwifiex_private to updates statistics and wake up tx queues. Or we may trigger tx queues timeout when transmitting lots of mgmt frames burstly.
Signed-off-by: Huawei Yang <harvey.huawei.yang@gmail.com>
---
drivers/net/wireless/mwifiex/cfg80211.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index e42b266..e8655f9 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -166,6 +166,10 @@ mwifiex_form_mgmt_frame(struct sk_buff *skb, const u8 *buf, size_t len)
memcpy(skb_put(skb, len - sizeof(struct ieee80211_hdr_3addr)),
buf + sizeof(struct ieee80211_hdr_3addr),
len - sizeof(struct ieee80211_hdr_3addr));
+
+ tx_info = MWIFIEX_SKB_TXCB(skb);
+ tx_info->bss_num = priv->bss_num;
+ tx_info->bss_type = priv->bss_type;
skb->priority = LOW_PRIO_TID;
do_gettimeofday(&tv);
--
1.7.10.4
^ permalink raw reply related
* Re: [RFC v2] mac80211: Use libnl-configurable values for retry counts
From: Felix Fietkau @ 2013-07-01 9:04 UTC (permalink / raw)
To: Jean-Pierre Tosoni; +Cc: linux-wireless
In-Reply-To: <000401ce7635$de99d1d0$9bcd7570$@acksys.fr>
On 2013-07-01 10:34 AM, Jean-Pierre Tosoni wrote:
> Thanks Felix.
>
> I am using the ath9k, but I have seen this in the b43 driver:
>
> rates[0].count = dev->wl->hw->conf.short_frame_max_tx_count;
>
> Do you think that short/long_frame_max_tx_count should rather be applied at
> the driver level (not mac80211) ?
> The ath9k driver currently enforces a minimum retry count of 30 (constant),
> it could be replaced with short/long_frame_max_tx_count ?
No, I think driver level is even more wrong than generic mac80211 rate
table code. The driver doesn't know more than mac80211 about how to
properly distribute a limited set of retries across different rates.
The only place that can properly control this is the rate control module.
The ath9k retry count of 30 that you're mentioning is software retry -
you should leave that one alone for now and focus on hardware retries.
- Felix
^ permalink raw reply
* RE: [RFC v2] mac80211: Use libnl-configurable values for retry counts
From: Jean-Pierre Tosoni @ 2013-07-01 8:34 UTC (permalink / raw)
To: 'Felix Fietkau'; +Cc: linux-wireless
In-Reply-To: <51CF3EC9.3000707@openwrt.org>
Thanks Felix.
I am using the ath9k, but I have seen this in the b43 driver:
rates[0].count = dev->wl->hw->conf.short_frame_max_tx_count;
Do you think that short/long_frame_max_tx_count should rather be applied at
the driver level (not mac80211) ?
The ath9k driver currently enforces a minimum retry count of 30 (constant),
it could be replaced with short/long_frame_max_tx_count ?
Jean-Pierre
> -----Message d'origine-----
> De : Felix Fietkau [mailto:nbd@openwrt.org]
> Envoyé : samedi 29 juin 2013 22:09
> À : Jean-Pierre Tosoni
> Cc : linux-wireless@vger.kernel.org
> Objet : Re: [RFC v2] mac80211: Use libnl-configurable values for retry
> counts
>
> On 2013-06-27 6:40 PM, Jean-Pierre Tosoni wrote:
> > From: J.P. Tosoni <jp.tosoni@acksys.fr>
> >
> > In the rate control algorithms, the maximum retry count is limited by
> > a) a constant value obtained from the hardware driver
> > b) a constant limit (6ms) on the time allowed for all
> > retries of each frame.
> >
> > Replace the retry count by existing configurable values from nl80211.
> > Use wiphy->retry_long for frames whose length exceed rts_threshold.
> > Use wiphy->retry_short for all other frames.
> > Check that the configured value does not exceed driver capabilities.
> > Use the new values as soon as the next frame is transmitted.
> >
> > Caveat: the retry count for frames sent outside the context of a STA is
> > still taken from the hardware driver.
> > ---
> > What I am seeking with this patch:
> > I believe the configuration of the retries will help making recovery
> > much faster when an AP (in infrastructure mode) or a peer (in mesh
> > mode) suddenly disappears.
> I'm all for reducing retries, but I think the way you're applying the
> limit is problematic.
> If minstrel decides to use many retries for a high rate and you're
> simply cutting off all retries that exceed the configured limit, you're
> potentially inviting quite a bit of unnecessary packet loss.
> I'm planning to remove the use of retry rate slot 4 (fallback to lowest
> rate) from minstrel, since max_prob_rate should already provide quite
> decent reliability.
>
> - Felix
^ permalink raw reply
* [PATCH v2 03/20] rt2x00: rt2800lib: add RFCSR register initialization for RT3593
From: Gabor Juhos @ 2013-07-01 7:47 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, users, Gabor Juhos
In-Reply-To: <1372664879-18474-1-git-send-email-juhosg@openwrt.org>
Based on the Ralink DPO_RT5572_LinuxSTA_2.6.0.1_20120629
driver.
References:
NICInitRT3593RFRegisters in chips/rt3593.c
RT3593LoadRFNormalModeSetup in chips/rt3593.c
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
drivers/net/wireless/rt2x00/rt2800.h | 10 +++
drivers/net/wireless/rt2x00/rt2800lib.c | 122 +++++++++++++++++++++++++++++++
2 files changed, 132 insertions(+)
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 02bc80d..47aceae 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -2093,6 +2093,10 @@ struct mac_iveiv_entry {
#define RFCSR17_R FIELD8(0x20)
#define RFCSR17_CODE FIELD8(0x7f)
+/* RFCSR 18 */
+#define RFCSR18_XO_TUNE_BYPASS FIELD8(0x40)
+
+
/*
* RFCSR 20:
*/
@@ -2174,6 +2178,12 @@ struct mac_iveiv_entry {
*/
#define RFCSR50_TX FIELD8(0x3f)
#define RFCSR50_EP FIELD8(0xc0)
+/* bits for RT3593*/
+#define RFCSR50_TX_LO2_EN FIELD8(0x10)
+
+/* RFCSR 51 */
+/* bits for RT3593*/
+#define RFCSR51_BITS24 FIELD8(0x1c)
/*
* RF registers
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 32ecd1a..0041b2c 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4964,6 +4964,42 @@ static void rt2800_normal_mode_setup_3xxx(struct rt2x00_dev *rt2x00dev)
}
}
+static void rt2800_normal_mode_setup_3593(struct rt2x00_dev *rt2x00dev)
+{
+ struct rt2800_drv_data *drv_data = rt2x00dev->drv_data;
+ u8 rfcsr;
+ u8 tx_gain;
+
+ rt2800_rfcsr_read(rt2x00dev, 50, &rfcsr);
+ rt2x00_set_field8(&rfcsr, RFCSR50_TX_LO2_EN, 0);
+ rt2800_rfcsr_write(rt2x00dev, 50, rfcsr);
+
+ rt2800_rfcsr_read(rt2x00dev, 51, &rfcsr);
+ tx_gain = rt2x00_get_field8(drv_data->txmixer_gain_24g,
+ RFCSR17_TXMIXER_GAIN);
+ rt2x00_set_field8(&rfcsr, RFCSR51_BITS24, tx_gain);
+ rt2800_rfcsr_write(rt2x00dev, 51, rfcsr);
+
+ rt2800_rfcsr_read(rt2x00dev, 38, &rfcsr);
+ rt2x00_set_field8(&rfcsr, RFCSR38_RX_LO1_EN, 0);
+ rt2800_rfcsr_write(rt2x00dev, 38, rfcsr);
+
+ rt2800_rfcsr_read(rt2x00dev, 39, &rfcsr);
+ rt2x00_set_field8(&rfcsr, RFCSR39_RX_LO2_EN, 0);
+ rt2800_rfcsr_write(rt2x00dev, 39, rfcsr);
+
+ rt2800_rfcsr_read(rt2x00dev, 1, &rfcsr);
+ rt2x00_set_field8(&rfcsr, RFCSR1_RF_BLOCK_EN, 1);
+ rt2x00_set_field8(&rfcsr, RFCSR1_PLL_PD, 1);
+ rt2800_rfcsr_write(rt2x00dev, 1, rfcsr);
+
+ rt2800_rfcsr_read(rt2x00dev, 30, &rfcsr);
+ rt2x00_set_field8(&rfcsr, RFCSR30_RX_VCM, 2);
+ rt2800_rfcsr_write(rt2x00dev, 30, rfcsr);
+
+ /* TODO: enable stream mode */
+}
+
static void rt2800_normal_mode_setup_5xxx(struct rt2x00_dev *rt2x00dev)
{
u8 reg;
@@ -5346,6 +5382,89 @@ static void rt2800_init_rfcsr_3572(struct rt2x00_dev *rt2x00dev)
rt2800_normal_mode_setup_3xxx(rt2x00dev);
}
+static void rt2800_init_rfcsr_3593(struct rt2x00_dev *rt2x00dev)
+{
+ struct rt2800_drv_data *drv_data = rt2x00dev->drv_data;
+ u32 reg;
+ u8 rfcsr;
+
+ /* Disable GPIO #4 and #7 function for LAN PE control */
+ rt2800_register_read(rt2x00dev, GPIO_SWITCH, ®);
+ rt2x00_set_field32(®, GPIO_SWITCH_4, 0);
+ rt2x00_set_field32(®, GPIO_SWITCH_7, 0);
+ rt2800_register_write(rt2x00dev, GPIO_SWITCH, reg);
+
+ /* Initialize default register values */
+ rt2800_rfcsr_write(rt2x00dev, 1, 0x03);
+ rt2800_rfcsr_write(rt2x00dev, 3, 0x80);
+ rt2800_rfcsr_write(rt2x00dev, 5, 0x00);
+ rt2800_rfcsr_write(rt2x00dev, 6, 0x40);
+ rt2800_rfcsr_write(rt2x00dev, 8, 0xf1);
+ rt2800_rfcsr_write(rt2x00dev, 9, 0x02);
+ rt2800_rfcsr_write(rt2x00dev, 10, 0xd3);
+ rt2800_rfcsr_write(rt2x00dev, 11, 0x40);
+ rt2800_rfcsr_write(rt2x00dev, 12, 0x4e);
+ rt2800_rfcsr_write(rt2x00dev, 13, 0x12);
+ rt2800_rfcsr_write(rt2x00dev, 18, 0x40);
+ rt2800_rfcsr_write(rt2x00dev, 22, 0x20);
+ rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
+ rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
+ rt2800_rfcsr_write(rt2x00dev, 32, 0x78);
+ rt2800_rfcsr_write(rt2x00dev, 33, 0x3b);
+ rt2800_rfcsr_write(rt2x00dev, 34, 0x3c);
+ rt2800_rfcsr_write(rt2x00dev, 35, 0xe0);
+ rt2800_rfcsr_write(rt2x00dev, 38, 0x86);
+ rt2800_rfcsr_write(rt2x00dev, 39, 0x23);
+ rt2800_rfcsr_write(rt2x00dev, 44, 0xd3);
+ rt2800_rfcsr_write(rt2x00dev, 45, 0xbb);
+ rt2800_rfcsr_write(rt2x00dev, 46, 0x60);
+ rt2800_rfcsr_write(rt2x00dev, 49, 0x8e);
+ rt2800_rfcsr_write(rt2x00dev, 50, 0x86);
+ rt2800_rfcsr_write(rt2x00dev, 51, 0x75);
+ rt2800_rfcsr_write(rt2x00dev, 52, 0x45);
+ rt2800_rfcsr_write(rt2x00dev, 53, 0x18);
+ rt2800_rfcsr_write(rt2x00dev, 54, 0x18);
+ rt2800_rfcsr_write(rt2x00dev, 55, 0x18);
+ rt2800_rfcsr_write(rt2x00dev, 56, 0xdb);
+ rt2800_rfcsr_write(rt2x00dev, 57, 0x6e);
+
+ /* Initiate calibration */
+ /* TODO: use rt2800_rf_init_calibration ? */
+ rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr);
+ rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 1);
+ rt2800_rfcsr_write(rt2x00dev, 2, rfcsr);
+
+ rt2800_adjust_freq_offset(rt2x00dev);
+
+ rt2800_rfcsr_read(rt2x00dev, 18, &rfcsr);
+ rt2x00_set_field8(&rfcsr, RFCSR18_XO_TUNE_BYPASS, 1);
+ rt2800_rfcsr_write(rt2x00dev, 18, rfcsr);
+
+ rt2800_register_read(rt2x00dev, LDO_CFG0, ®);
+ rt2x00_set_field32(®, LDO_CFG0_LDO_CORE_VLEVEL, 3);
+ rt2x00_set_field32(®, LDO_CFG0_BGSEL, 1);
+ rt2800_register_write(rt2x00dev, LDO_CFG0, reg);
+ usleep_range(1000, 1500);
+ rt2800_register_read(rt2x00dev, LDO_CFG0, ®);
+ rt2x00_set_field32(®, LDO_CFG0_LDO_CORE_VLEVEL, 0);
+ rt2800_register_write(rt2x00dev, LDO_CFG0, reg);
+
+ /* Set initial values for RX filter calibration */
+ drv_data->calibration_bw20 = 0x1f;
+ drv_data->calibration_bw40 = 0x2f;
+
+ /* Save BBP 25 & 26 values for later use in channel switching */
+ rt2800_bbp_read(rt2x00dev, 25, &drv_data->bbp25);
+ rt2800_bbp_read(rt2x00dev, 26, &drv_data->bbp26);
+
+ rt2800_led_open_drain_enable(rt2x00dev);
+ rt2800_normal_mode_setup_3593(rt2x00dev);
+
+ /* TODO: post BBP initialization */
+
+ /* TODO: enable stream mode support */
+}
+
static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev)
{
rt2800_rf_init_calibration(rt2x00dev, 2);
@@ -5571,6 +5690,9 @@ static void rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
case RT3390:
rt2800_init_rfcsr_3390(rt2x00dev);
break;
+ case RT3593:
+ rt2800_init_rfcsr_3593(rt2x00dev);
+ break;
case RT3572:
rt2800_init_rfcsr_3572(rt2x00dev);
break;
--
1.7.10
^ permalink raw reply related
* [PATCH v2 20/20] rt2x00: rt2800usb: add USB device ID for Linksys AE3000
From: Gabor Juhos @ 2013-07-01 7:47 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, users, Gabor Juhos
In-Reply-To: <1372664879-18474-1-git-send-email-juhosg@openwrt.org>
The Linksys AE3000 device is based on the RT3573
chipset. The support for this chipset is available
already, and the AE3000 device works with the driver.
Only managed mode works correctly at the moment,
for AP mode additional changes are needed in the
driver.
Also add a new RT2800USB_RT3573 Kconfig option and
only enable support for RT3573 based devices if
that is enabled.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
Changes since v1:
- Make the support selectable by a Kconfig option.
---
drivers/net/wireless/rt2x00/Kconfig | 6 ++++++
drivers/net/wireless/rt2x00/rt2800usb.c | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
index 9b915d3..c60d6e8 100644
--- a/drivers/net/wireless/rt2x00/Kconfig
+++ b/drivers/net/wireless/rt2x00/Kconfig
@@ -166,6 +166,12 @@ config RT2800USB_RT35XX
rt2800usb driver.
Supported chips: RT3572
+config RT2800USB_RT3573
+ bool "rt2800usb - Include support for rt3573 devices (EXPERIMENTAL)"
+ ---help---
+ This enables support for RT3573 chipset based wireless USB devices
+ in the rt2800usb driver.
+
config RT2800USB_RT53XX
bool "rt2800usb - Include support for rt53xx devices (EXPERIMENTAL)"
---help---
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index c24c1fd..ab609ae 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1197,6 +1197,10 @@ static struct usb_device_id rt2800usb_device_table[] = {
/* Zinwell */
{ USB_DEVICE(0x5a57, 0x0284) },
#endif
+#ifdef CONFIG_RT2800USB_RT3573
+ /* Linksys */
+ { USB_DEVICE(0x13b1, 0x003b) },
+#endif
#ifdef CONFIG_RT2800USB_RT53XX
/* Arcadyan */
{ USB_DEVICE(0x043e, 0x7a12) },
--
1.7.10
^ permalink raw reply related
* [PATCH v2 19/20] rt2x00: rt2800usb: use correct [RT]XWI size for RT3593
From: Gabor Juhos @ 2013-07-01 7:47 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, users, Gabor Juhos
In-Reply-To: <1372664879-18474-1-git-send-email-juhosg@openwrt.org>
The RT3593 chipset requires different [RT]XWI size
values. Modify the driver to use the correct values.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
drivers/net/wireless/rt2x00/rt2800.h | 1 +
drivers/net/wireless/rt2x00/rt2800usb.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 1ba797b..a313241 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -2814,6 +2814,7 @@ enum rt2800_eeprom_word {
#define TXWI_DESC_SIZE_5WORDS (5 * sizeof(__le32))
#define RXWI_DESC_SIZE_4WORDS (4 * sizeof(__le32))
+#define RXWI_DESC_SIZE_5WORDS (5 * sizeof(__le32))
#define RXWI_DESC_SIZE_6WORDS (6 * sizeof(__le32))
/*
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 840833b..c24c1fd 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -854,7 +854,10 @@ static void rt2800usb_queue_init(struct data_queue *queue)
struct rt2x00_dev *rt2x00dev = queue->rt2x00dev;
unsigned short txwi_size, rxwi_size;
- if (rt2x00_rt(rt2x00dev, RT5592)) {
+ if (rt2x00_rt(rt2x00dev, RT3593)) {
+ txwi_size = TXWI_DESC_SIZE_4WORDS;
+ rxwi_size = RXWI_DESC_SIZE_5WORDS;
+ } else if (rt2x00_rt(rt2x00dev, RT5592)) {
txwi_size = TXWI_DESC_SIZE_5WORDS;
rxwi_size = RXWI_DESC_SIZE_6WORDS;
} else {
--
1.7.10
^ permalink raw reply related
* [PATCH v2 18/20] rt2x00: rt2800lib: enable RT3593 support
From: Gabor Juhos @ 2013-07-01 7:47 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, users, Gabor Juhos
In-Reply-To: <1372664879-18474-1-git-send-email-juhosg@openwrt.org>
Support for the RT3593 has been implemented in
the previous changes, so it is safe to mark it
supported in the driver.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
drivers/net/wireless/rt2x00/rt2800lib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index b7fa8f9..d20c9f3 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7637,6 +7637,7 @@ static int rt2800_probe_rt(struct rt2x00_dev *rt2x00dev)
case RT3352:
case RT3390:
case RT3572:
+ case RT3593:
case RT5390:
case RT5392:
case RT5592:
--
1.7.10
^ permalink raw reply related
* [PATCH v2 17/20] rt2x00: rt2800lib: enable RF3053 support
From: Gabor Juhos @ 2013-07-01 7:47 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, users, Gabor Juhos
In-Reply-To: <1372664879-18474-1-git-send-email-juhosg@openwrt.org>
Support for the RF3053 has been implemented in
the previous changes, so it is safe to mark it
supported in the driver.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
drivers/net/wireless/rt2x00/rt2800lib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 0a0f96f..b7fa8f9 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -6949,6 +6949,7 @@ static int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
case RF3021:
case RF3022:
case RF3052:
+ case RF3053:
case RF3290:
case RF3320:
case RF3322:
--
1.7.10
^ permalink raw reply related
* [PATCH v2 16/20] rt2x00: rt2800lib: enable VCO recalibration for RF3053
From: Gabor Juhos @ 2013-07-01 7:47 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, users, Gabor Juhos
In-Reply-To: <1372664879-18474-1-git-send-email-juhosg@openwrt.org>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
drivers/net/wireless/rt2x00/rt2800lib.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index ab67dba..0a0f96f 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4196,6 +4196,7 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev)
rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
break;
case RF3290:
+ case RF3053:
case RF5360:
case RF5370:
case RF5372:
@@ -7596,6 +7597,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
case RF3022:
case RF3320:
case RF3052:
+ case RF3053:
case RF3290:
case RF5360:
case RF5370:
--
1.7.10
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox