From 3465f90cea0598384651a38fac916845caf7889e Mon Sep 17 00:00:00 2001 From: Martin Molnar Date: Mon, 26 Nov 2007 17:59:51 +0100 Subject: [PATCH] wmm kernel patch added --- patches/ac_param_setup_24-rc2.patch | 67 +++++++++++++++++++++++++++++ patches/ac_param_setup_24-rc3.patch | 67 +++++++++++++++++++++++++++++ patches/series | 1 + 3 files changed, 135 insertions(+) create mode 100644 patches/ac_param_setup_24-rc2.patch create mode 100644 patches/ac_param_setup_24-rc3.patch create mode 100644 patches/series diff --git a/patches/ac_param_setup_24-rc2.patch b/patches/ac_param_setup_24-rc2.patch new file mode 100644 index 0000000..0d6d245 --- /dev/null +++ b/patches/ac_param_setup_24-rc2.patch @@ -0,0 +1,67 @@ +Index: linux2.6-devel/drivers/net/wireless/rt2x00/rt2x00mac.c +=================================================================== +--- linux2.6-devel.orig/drivers/net/wireless/rt2x00/rt2x00mac.c 2007-11-14 15:16:34.000000000 +0100 ++++ linux2.6-devel/drivers/net/wireless/rt2x00/rt2x00mac.c 2007-11-14 17:09:44.000000000 +0100 +@@ -421,6 +421,7 @@ + * The passed variables are stored as real value ((2^n)-1). + * Ralink registers require to know the bit number 'n'. + */ ++#if 0 + if (params->cw_min) + ring->tx_params.cw_min = fls(params->cw_min); + else +@@ -435,6 +436,35 @@ + ring->tx_params.aifs = params->aifs; + else + ring->tx_params.aifs = 2; ++#endif ++ ++ switch (queue) { ++ case 0: ++ ring->tx_params.aifs = 2; ++ ring->tx_params.cw_max = 4; ++ ring->tx_params.cw_min = 3; ++ break; ++ case 1: ++ ring->tx_params.aifs = 2; ++ ring->tx_params.cw_max = 5; ++ ring->tx_params.cw_min = 4; ++ break; ++ case 2: ++ ring->tx_params.aifs = 3; ++ ring->tx_params.cw_max = 10; ++ ring->tx_params.cw_min = 5; ++ break; ++ case 3: ++ ring->tx_params.aifs = 7; ++ ring->tx_params.cw_max = 10; ++ ring->tx_params.cw_min = 5; ++ break; ++ default: ++ ring->tx_params.aifs = 15; ++ ring->tx_params.cw_max = 15; ++ ring->tx_params.cw_min = 10; ++ break; ++ } + + INFO(rt2x00dev, + "Configured TX ring %d - CWmin: %d, CWmax: %d, Aifs: %d.\n", +Index: linux2.6-devel/net/mac80211/wme.c +=================================================================== +--- linux2.6-devel.orig/net/mac80211/wme.c 2007-11-14 15:16:34.000000000 +0100 ++++ linux2.6-devel/net/mac80211/wme.c 2007-11-14 15:17:58.000000000 +0100 +@@ -112,12 +112,12 @@ + + /* is this a QoS frame? */ + qos = fc & IEEE80211_STYPE_QOS_DATA; +- ++#if 0 + if (!qos) { + skb->priority = 0; /* required for correct WPA/11i MIC */ + return ieee802_1d_to_ac[skb->priority]; + } +- ++#endif + /* use the data classifier to determine what 802.1d tag the + * data frame has */ + skb->priority = classify_1d(skb, qd); diff --git a/patches/ac_param_setup_24-rc3.patch b/patches/ac_param_setup_24-rc3.patch new file mode 100644 index 0000000..c7d0f49 --- /dev/null +++ b/patches/ac_param_setup_24-rc3.patch @@ -0,0 +1,67 @@ +Index: linux2.6-devel/drivers/net/wireless/rt2x00/rt2x00mac.c +=================================================================== +--- linux2.6-devel.orig/drivers/net/wireless/rt2x00/rt2x00mac.c 2007-11-12 15:10:49.000000000 +0100 ++++ linux2.6-devel/drivers/net/wireless/rt2x00/rt2x00mac.c 2007-11-14 15:13:16.000000000 +0100 +@@ -421,6 +421,7 @@ + * The passed variables are stored as real value ((2^n)-1). + * Ralink registers require to know the bit number 'n'. + */ ++#if 0 + if (params->cw_min) + ring->tx_params.cw_min = fls(params->cw_min); + else +@@ -435,6 +436,35 @@ + ring->tx_params.aifs = params->aifs; + else + ring->tx_params.aifs = 2; ++#endif ++ ++ switch (queue) { ++ case 0: ++ ring->tx_params.aifs = 15; ++ ring->tx_params.cw_max = 10; ++ ring->tx_params.cw_min = 5; ++ break; ++ case 1: ++ ring->tx_params.aifs = 10; ++ ring->tx_params.cw_max = 10; ++ ring->tx_params.cw_min = 5; ++ break; ++ case 2: ++ ring->tx_params.aifs = 6; ++ ring->tx_params.cw_max = 5; ++ ring->tx_params.cw_min = 4; ++ break; ++ case 3: ++ ring->tx_params.aifs = 2; ++ ring->tx_params.cw_max = 4; ++ ring->tx_params.cw_min = 3; ++ break; ++ default: ++ ring->tx_params.aifs = 15; ++ ring->tx_params.cw_max = 15; ++ ring->tx_params.cw_min = 10; ++ break; ++ } + + INFO(rt2x00dev, + "Configured TX ring %d - CWmin: %d, CWmax: %d, Aifs: %d.\n", +Index: linux2.6-devel/net/mac80211/wme.c +=================================================================== +--- linux2.6-devel.orig/net/mac80211/wme.c 2007-11-12 15:10:49.000000000 +0100 ++++ linux2.6-devel/net/mac80211/wme.c 2007-11-14 15:09:36.000000000 +0100 +@@ -112,12 +112,12 @@ + + /* is this a QoS frame? */ + qos = fc & IEEE80211_STYPE_QOS_DATA; +- ++#if 0 + if (!qos) { + skb->priority = 0; /* required for correct WPA/11i MIC */ + return ieee802_1d_to_ac[skb->priority]; + } +- ++#endif + /* use the data classifier to determine what 802.1d tag the + * data frame has */ + skb->priority = classify_1d(skb, qd); diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..8e0fb09 --- /dev/null +++ b/patches/series @@ -0,0 +1 @@ +ac_param_setup_24-rc3.patch -- 2.39.2