aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-04 23:23:17 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-04 23:23:17 (GMT)
commit7e3c178142f68daaea081e2b9e0bd78a6bcd0d47 (patch)
treeedbe598c5140a2b1bb269d0a0721f0cfe0363fe8
parentccb7e5ee599249d840037a2616222f5c9678f994 (diff)
downloadhostap-7e3c178142f68daaea081e2b9e0bd78a6bcd0d47.zip
hostap-7e3c178142f68daaea081e2b9e0bd78a6bcd0d47.tar.gz
hostap-7e3c178142f68daaea081e2b9e0bd78a6bcd0d47.tar.bz2
Remove unused TX queue parameters related to Beacon frames
These are not used by any driver wrapper, i.e., only the four data queues (BK, BE, VI, VO) are configurable. Better remove these so that there is no confusion about being able to configure something additional.
-rw-r--r--hostapd/config_file.c21
-rw-r--r--hostapd/hostapd.conf12
-rw-r--r--src/ap/ap_config.h2
-rw-r--r--src/drivers/driver.h2
-rw-r--r--src/drivers/driver_nl80211.c15
5 files changed, 27 insertions, 25 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index e53d9c1..ac69f24 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -752,10 +752,7 @@ enum {
IEEE80211_TX_QUEUE_DATA0 = 0, /* used for EDCA AC_VO data */
IEEE80211_TX_QUEUE_DATA1 = 1, /* used for EDCA AC_VI data */
IEEE80211_TX_QUEUE_DATA2 = 2, /* used for EDCA AC_BE data */
- IEEE80211_TX_QUEUE_DATA3 = 3, /* used for EDCA AC_BK data */
- IEEE80211_TX_QUEUE_DATA4 = 4,
- IEEE80211_TX_QUEUE_AFTER_BEACON = 6,
- IEEE80211_TX_QUEUE_BEACON = 7
+ IEEE80211_TX_QUEUE_DATA3 = 3 /* used for EDCA AC_BK data */
};
static int hostapd_config_tx_queue(struct hostapd_config *conf, char *name,
@@ -771,17 +768,21 @@ static int hostapd_config_tx_queue(struct hostapd_config *conf, char *name,
pos[4] >= '0' && pos[4] <= '9' && pos[5] == '_') {
num = pos[4] - '0';
pos += 6;
- } else if (os_strncmp(pos, "after_beacon_", 13) == 0) {
- num = IEEE80211_TX_QUEUE_AFTER_BEACON;
- pos += 13;
- } else if (os_strncmp(pos, "beacon_", 7) == 0) {
- num = IEEE80211_TX_QUEUE_BEACON;
- pos += 7;
+ } else if (os_strncmp(pos, "after_beacon_", 13) == 0 ||
+ os_strncmp(pos, "beacon_", 7) == 0) {
+ wpa_printf(MSG_INFO, "DEPRECATED: '%s' not used", name);
+ return 0;
} else {
wpa_printf(MSG_ERROR, "Unknown tx_queue name '%s'", pos);
return -1;
}
+ if (num >= NUM_TX_QUEUES) {
+ /* for backwards compatibility, do not tricker failure */
+ wpa_printf(MSG_INFO, "DEPRECATED: '%s' not used", name);
+ return 0;
+ }
+
queue = &conf->tx_queue[num];
if (os_strcmp(pos, "aifs") == 0) {
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index 85b80b2..a9cd023 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -240,18 +240,6 @@ ignore_broadcast_ssid=0
#tx_queue_data0_cwmax=7
#tx_queue_data0_burst=1.5
# Note: for IEEE 802.11b mode: cWmin=7 cWmax=15 burst=3.3
-#
-# Special queues; normally not user configurable
-#
-#tx_queue_after_beacon_aifs=2
-#tx_queue_after_beacon_cwmin=15
-#tx_queue_after_beacon_cwmax=1023
-#tx_queue_after_beacon_burst=0
-#
-#tx_queue_beacon_aifs=2
-#tx_queue_beacon_cwmin=3
-#tx_queue_beacon_cwmax=7
-#tx_queue_beacon_burst=1.5
# 802.1D Tag (= UP) to AC mappings
# WMM specifies following mapping of data frames to different ACs. This mapping
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index fc74d80..fd2abce 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -123,7 +123,7 @@ struct hostapd_eap_user {
};
-#define NUM_TX_QUEUES 8
+#define NUM_TX_QUEUES 4
struct hostapd_tx_queue_params {
int aifs;
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 6d9f55c..e0ee183 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1529,7 +1529,7 @@ struct wpa_driver_ops {
/**
* set_tx_queue_params - Set TX queue parameters
* @priv: Private driver interface data
- * @queue: Queue number
+ * @queue: Queue number (0 = VO, 1 = VI, 2 = BE, 3 = BK)
* @aifs: AIFS
* @cw_min: cwMin
* @cw_max: cwMax
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 5caa2fc..250bff4 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4866,7 +4866,20 @@ static int i802_set_tx_queue_params(void *priv, int queue, int aifs,
if (!params)
goto nla_put_failure;
- NLA_PUT_U8(msg, NL80211_TXQ_ATTR_QUEUE, queue);
+ switch (queue) {
+ case 0:
+ NLA_PUT_U8(msg, NL80211_TXQ_ATTR_QUEUE, NL80211_TXQ_Q_VO);
+ break;
+ case 1:
+ NLA_PUT_U8(msg, NL80211_TXQ_ATTR_QUEUE, NL80211_TXQ_Q_VI);
+ break;
+ case 2:
+ NLA_PUT_U8(msg, NL80211_TXQ_ATTR_QUEUE, NL80211_TXQ_Q_BE);
+ break;
+ case 3:
+ NLA_PUT_U8(msg, NL80211_TXQ_ATTR_QUEUE, NL80211_TXQ_Q_BK);
+ break;
+ }
/* Burst time is configured in units of 0.1 msec and TXOP parameter in
* 32 usec, so need to convert the value here. */
NLA_PUT_U16(msg, NL80211_TXQ_ATTR_TXOP, (burst_time * 100 + 16) / 32);