Skip to contentSkip to conversation

ath9k: Remove ath9k rate control

PATCH Superseded Sujith Manoharan 2 participants 4 messages Feb 6, 2014 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ath9k: Remove ath9k rate control

From: Sujith Manoharan <[email protected]>

There is no benefit in retaining the legacy rate control module in the driver codebase.

It is known to be buggy and has less than optimal performance in real-world environments compared with minstrel. The only reason that it was kept when we made the switch to minstrel as default was that it showed higher throughput numbers in a clean/ideal environment.

This is no longer the case and minstrel can push ath9k to the same throughput levels. In TCP, with 3-stream cards, more than 295 Mbps can be obtained in open air, with 2-stream cards, 210 Mbps is easily reached. To test performance issues, instead of using a broken rate control module, it is better to use the fixed-rate interface provided by mac80211 anyway.

The ath9k RC has not received any bug fixes in years and is just bit-rotting away - this patch removes it.

---
v2 - Fix spelling mistakes in the commit log.

 drivers/net/wireless/ath/ath9k/Kconfig     |   12 -
 drivers/net/wireless/ath/ath9k/Makefile    |    1 -
 drivers/net/wireless/ath/ath9k/ath9k.h     |    6 +-
 drivers/net/wireless/ath/ath9k/debug.h     |    1 -
 drivers/net/wireless/ath/ath9k/dfs_debug.h |    2 +
 drivers/net/wireless/ath/ath9k/hw.c        |    1 -
 drivers/net/wireless/ath/ath9k/init.c      |   14 +-
 drivers/net/wireless/ath/ath9k/rc.c        | 1495 ----------------------------
 drivers/net/wireless/ath/ath9k/rc.h        |  248 -----
 9 files changed, 8 insertions(+), 1772 deletions(-)
 delete mode 100644 drivers/net/wireless/ath/ath9k/rc.c
 delete mode 100644 drivers/net/wireless/ath/ath9k/rc.h
drivers/net/wireless/ath/ath9k/Kconfig +0 -12
index 7b96b3e..8fcc029 100644
@@ -120,18 +120,6 @@ config ATH9K_WOW
 	  This option enables Wake on Wireless LAN support for certain cards.
 	  Currently, AR9462 is supported.
 
-config ATH9K_LEGACY_RATE_CONTROL
-	bool "Atheros ath9k rate control"
-	depends on ATH9K
-	default n
-	---help---
-	  Say Y, if you want to use the ath9k specific rate control
-	  module instead of minstrel_ht. Be warned that there are various
-	  issues with the ath9k RC and minstrel is a more robust algorithm.
-	  Note that even if this option is selected, "ath9k_rate_control"
-	  has to be passed to mac80211 using the module parameter,
-	  ieee80211_default_rc_algo.
-
 config ATH9K_RFKILL
 	bool "Atheros ath9k rfkill support" if EXPERT
 	depends on ATH9K
drivers/net/wireless/ath/ath9k/Makefile +0 -1
index a40e5c5..747975e 100644
@@ -8,7 +8,6 @@ ath9k-y +=	beacon.o \
 		antenna.o
 
 ath9k-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += mci.o
-ath9k-$(CONFIG_ATH9K_LEGACY_RATE_CONTROL) += rc.o
 ath9k-$(CONFIG_ATH9K_PCI) += pci.o
 ath9k-$(CONFIG_ATH9K_AHB) += ahb.o
 ath9k-$(CONFIG_ATH9K_DFS_DEBUGFS) += dfs_debug.o
drivers/net/wireless/ath/ath9k/ath9k.h +5 -1
index b5ac32c..5840914 100644
@@ -30,7 +30,6 @@
 #include "spectral.h"
 
 struct ath_node;
-struct ath_rate_table;
 
 extern struct ieee80211_ops ath9k_ops;
 extern int ath9k_modparam_nohwcrypt;
@@ -150,6 +149,11 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,
 #define IS_CCK_RATE(rate)  ((rate >= 0x18) && (rate <= 0x1e))
 #define IS_OFDM_RATE(rate) ((rate >= 0x8) && (rate <= 0xf))
 
+enum {
+       WLAN_RC_PHY_OFDM,
+       WLAN_RC_PHY_CCK,
+};
+
 struct ath_txq {
 	int mac80211_qnum; /* mac80211 queue number, -1 means not mac80211 Q */
 	u32 axq_qnum; /* ath9k hardware queue number */
drivers/net/wireless/ath/ath9k/debug.h +0 -1
index cc7a025..559a68c 100644
@@ -18,7 +18,6 @@
 #define DEBUG_H
 
 #include "hw.h"
-#include "rc.h"
 #include "dfs_debug.h"
 
 struct ath_txq;
drivers/net/wireless/ath/ath9k/dfs_debug.h +2 -0
index 0a7ddf4..7936c91 100644
@@ -21,6 +21,8 @@
 
 #include "hw.h"
 
+struct ath_softc;
+
 /**
  * struct ath_dfs_stats - DFS Statistics per wiphy
  * @pulses_total:     pulses reported by HW
drivers/net/wireless/ath/ath9k/hw.c +0 -1
index 11eab9f..5db01b4 100644
@@ -23,7 +23,6 @@
 
 #include "hw.h"
 #include "hw-ops.h"
-#include "rc.h"
 #include "ar9003_mac.h"
 #include "ar9003_mci.h"
 #include "ar9003_phy.h"
drivers/net/wireless/ath/ath9k/init.c +1 -13
index 1fc2e5a..68dcc86 100644
@@ -1106,19 +1106,11 @@ static int __init ath9k_init(void)
 {
 	int error;
 
-	/* Register rate control algorithm */
-	error = ath_rate_control_register();
-	if (error != 0) {
-		pr_err("Unable to register rate control algorithm: %d\n",
-		       error);
-		goto err_out;
-	}
-
 	error = ath_pci_init();
 	if (error < 0) {
 		pr_err("No PCI devices found, driver not installed\n");
 		error = -ENODEV;
-		goto err_rate_unregister;
+		goto err_out;
 	}
 
 	error = ath_ahb_init();
@@ -1131,9 +1123,6 @@ static int __init ath9k_init(void)
 
  err_pci_exit:
 	ath_pci_exit();
-
- err_rate_unregister:
-	ath_rate_control_unregister();
  err_out:
 	return error;
 }
@@ -1144,7 +1133,6 @@ static void __exit ath9k_exit(void)
 	is_ath9k_unloaded = true;
 	ath_ahb_exit();
 	ath_pci_exit();
-	ath_rate_control_unregister();
 	pr_info("%s: Driver unloaded\n", dev_info);
 }
 module_exit(ath9k_exit);
drivers/net/wireless/ath/ath9k/rc.c deleted +0 -1495

1,495 lines not on this page · raw message

drivers/net/wireless/ath/ath9k/rc.h deleted +0 -248

248 lines not on this page · raw message

Signature · 1 line
1.8.5.3
#1 lore raw

PATCH v2 1/1 ath9k: Remove ath9k rate control

Quoted 11 lines · Sujith Manoharan

From: Sujith Manoharan <[email protected]>

There is no benefit in retaining the legacy rate control module in the driver codebase.

It is known to be buggy and has less than optimal performance in real-world environments compared with minstrel. The only reason that it was kept when we made the switch to minstrel as default was that it showed higher throughput numbers in a clean/ideal environment.

Quoted 6 lines

This is no longer the case and minstrel can push ath9k to the same throughput levels. In TCP, with 3-stream cards, more than 295 Mbps can be obtained in open air, with 2-stream cards, 210 Mbps is easily reached. To test performance issues, instead of using a broken rate control module, it is better to use the fixed-rate interface provided by mac80211 anyway.

Can you let us know the details on how your set up that TCP traffic? For instance, number of streams, write size, socket buffer sizes, etc? Upload, download, or are both similar throughput in your testing?

I find that those settings influence throughput a great deal, and I have not yet been able to reach 295Mbps of TCP throughput in our testing w/out hacking the tcp-ack logic to increase ack delays.

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#2 lore raw

PATCH v2 1/1 ath9k: Remove ath9k rate control

Quoted 4 lines · Ben Greear

Can you let us know the details on how your set up that TCP traffic? For instance, number of streams, write size, socket buffer sizes, etc? Upload, download, or are both similar throughput in your testing?

Stock OpenWrt (trunk) running on a 3x3 Scorpion board (AP136/AP135) as AP. Windows 7 as client, using a 3x3 AR9300 card.

iperf with window size 512k, 4 parallel threads. With both
TX and RX, 290+ Mbps is seen. UDP traffic: 330 Mbps in both directions.
Environment: open air and the station is located about 1 meter from the AP.

Quoted 3 lines

I find that those settings influence throughput a great deal, and I have not yet been able to reach 295Mbps of TCP throughput in our testing w/out hacking the tcp-ack logic to increase ack delays.

By adjusting TCP parameters using sysctl or hacking the code ?

Sujith

#3 lore raw

PATCH v2 1/1 ath9k: Remove ath9k rate control

Quoted 6 lines · Sujith Manoharan
Quoted 4 lines · Ben Greear

Can you let us know the details on how your set up that TCP traffic? For instance, number of streams, write size, socket buffer sizes, etc? Upload, download, or are both similar throughput in your testing?

Quoted 6 lines

Stock OpenWrt (trunk) running on a 3x3 Scorpion board (AP136/AP135) as AP. Windows 7 as client, using a 3x3 AR9300 card.

iperf with window size 512k, 4 parallel threads. With both
TX and RX, 290+ Mbps is seen. UDP traffic: 330 Mbps in both directions.
Environment: open air and the station is located about 1 meter from the AP.

We get similar UDP throughput (and maybe up to 340Mbps using ath9k rate control), but not so good on TCP.

All our tests so far are on 3.9 kernel, so maybe things are better on later kernels.

Someday soon-ish we'll be moving to newer kernels and will test it again.

Quoted 5 lines
Quoted 3 lines

I find that those settings influence throughput a great deal, and I have not yet been able to reach 295Mbps of TCP throughput in our testing w/out hacking the tcp-ack logic to increase ack delays.

By adjusting TCP parameters using sysctl or hacking the code ?

There is no sysctl for this in upstream code as far as I know ...I ended up hacking code by modifying some delayed-ack patches someone else posted some time back.

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com