All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] [RFC] ath9k: 4ms frame length table update
@ 2010-03-18  6:37 selvam
  2010-03-18 16:00   ` Luis R. Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: selvam @ 2010-03-18  6:37 UTC (permalink / raw)
  To: ath9k-devel

Hi,

The 4 ms frame length table is updated to support up to MCS 31.

These values are calculated based on the equation 9.1 from the IEEE 802.11n
standard.
These values are rounded off to multiple of 4 bytes. If the final value is
greater than 65535 then it is changed to 65532, since the maximum A-MPDU
length is 65535 bytes.


Selvam.T


diff --git a/drivers/net/wireless/ath/ath9k/xmit.c
b/drivers/net/wireless/ath/ath9k/xmit.c
index 8359362..ba5ee72 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -71,24 +71,36 @@ static void ath_tx_rc_status(struct ath_buf *bf, struct
ath_desc *ds,
                  int nbad, int txok, bool update_rc);

 enum {
-    MCS_DEFAULT,
+    MCS_HT20,
+    MCS_HT20_SGI,
     MCS_HT40,
     MCS_HT40_SGI,
 };

-static int ath_max_4ms_framelen[3][16] = {
-    [MCS_DEFAULT] = {
-        3216,  6434,  9650,  12868, 19304, 25740,  28956,  32180,
-        6430,  12860, 19300, 25736, 38600, 51472,  57890,  64320,
+static int ath_max_4ms_framelen[4][32] = {
+    [MCS_HT20] = {
+        3212,  6432,  9648,  12864,  19300,  25736,  28952,  32172,
+        6424,  12852, 19280, 25708,  38568,  51424,  57852,  64280,
+        9628,  19260, 28896, 38528,  57792,  65532,  65532,  65532,
+        12828, 25656, 38488, 51320,  65532,  65532,  65532,  65532,
     },
+    [MCS_HT20_SGI] = {
+        3572,  7144,  10720,  14296,  21444,  28596,  32172,  35744,
+        7140,  14284, 21428,  28568,  42856,  57144,  64288,  65532,
+        10700, 21408, 32112,  42816,  64228,  65532,  65532,  65532,
+        14256, 28516, 42780,  57040,  65532,  65532,  65532,  65532,
+        },
     [MCS_HT40] = {
-        6684,  13368, 20052, 26738, 40104, 53476,  60156,  66840,
-        13360, 26720, 40080, 53440, 80160, 106880, 120240, 133600,
+        6680,  13360,  20044,  26724,  40092,  53456,  60140,  65532,
+        13348, 26700,  40052,  53400,  65532,  65532,  65532,  65532,
+        20004, 40008,  60016,  65532,  65532,  65532,  65532,  65532,
+        26644, 53292,  65532,  65532,  65532,  65532,  65532,  65532,
     },
     [MCS_HT40_SGI] = {
-        /* TODO: Only MCS 7 and 15 updated, recalculate the rest */
-        6684,  13368, 20052, 26738, 40104, 53476,  60156,  74200,
-        13360, 26720, 40080, 53440, 80160, 106880, 120240, 148400,
+        7420,  14844,  22272,  29696,  44544,  59396,  65532,  65532,
+        14832, 29668,  44504,  59340,  65532,  65532,  65532,  65532,
+        22232, 44464,  65532,  65532,  65532,  65532,  65532,  65532,
+        29616, 59232,  65532,  65532,  65532,  65532,  65532,  65532,
     }
 };

@@ -508,13 +520,19 @@ static u32 ath_lookup_rate(struct ath_softc *sc,
struct ath_buf *bf,
                 break;
             }

-            if (rates[i].flags & IEEE80211_TX_RC_SHORT_GI)
-                modeidx = MCS_HT40_SGI;
-            else if (rates[i].flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
-                modeidx = MCS_HT40;
-            else
-                modeidx = MCS_DEFAULT;
-
+            if (rates[i].flags & IEEE80211_TX_RC_40_MHZ_WIDTH) {
+                if (rates[i].flags & IEEE80211_TX_RC_SHORT_GI)
+                    modeidx = MCS_HT40_SGI;
+                else
+                    modeidx = MCS_HT40;
+            }
+            else {
+                if (rates[i].flags & IEEE80211_TX_RC_SHORT_GI)
+                    modeidx = MCS_HT20_SGI;
+                else
+                    modeidx = MCS_HT20;
+            }
+
             frmlen = ath_max_4ms_framelen[modeidx][rates[i].idx];
             max_4ms_framelen = min(max_4ms_framelen, frmlen);
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20100318/7a34b4e3/attachment.htm 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [ath9k-devel] [RFC] ath9k: 4ms frame length table update
  2010-03-18  6:37 [ath9k-devel] [RFC] ath9k: 4ms frame length table update selvam
@ 2010-03-18 16:00   ` Luis R. Rodriguez
  0 siblings, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2010-03-18 16:00 UTC (permalink / raw)
  To: selvam; +Cc: ath9k-devel, linux-wireless, Vipin M

On Wed, Mar 17, 2010 at 11:37:29PM -0700, selvam wrote:
> Hi,
> 
> The 4 ms frame length table is updated to support up to MCS 31.
> 
> These values are calculated based on the equation 9.1 from the IEEE 802.11n standard.
> These values are rounded off to multiple of 4 bytes. If the final value is greater than 65535 then it is changed to 65532, since the maximum A-MPDU length is 65535 bytes.

Thanks for this patch, but can you elaborate on what your patch does other
than the above. For example, you may want to mention that although the current
ath9k driver does not support up to MCS31 your patch would enable such support
for future chipsets which could be supported. You also forgot to Signed-off-by
it, and provide a clearer commit log entry. Check git log for examples on
wireless-testing, also read:

http://wireless.kernel.org/en/developers/Documentation/SubmittingPatches
http://wireless.kernel.org/en/developers/Documentation

  Luis

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ath9k-devel] [RFC] ath9k: 4ms frame length table update
@ 2010-03-18 16:00   ` Luis R. Rodriguez
  0 siblings, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2010-03-18 16:00 UTC (permalink / raw)
  To: ath9k-devel

On Wed, Mar 17, 2010 at 11:37:29PM -0700, selvam wrote:
> Hi,
> 
> The 4 ms frame length table is updated to support up to MCS 31.
> 
> These values are calculated based on the equation 9.1 from the IEEE 802.11n standard.
> These values are rounded off to multiple of 4 bytes. If the final value is greater than 65535 then it is changed to 65532, since the maximum A-MPDU length is 65535 bytes.

Thanks for this patch, but can you elaborate on what your patch does other
than the above. For example, you may want to mention that although the current
ath9k driver does not support up to MCS31 your patch would enable such support
for future chipsets which could be supported. You also forgot to Signed-off-by
it, and provide a clearer commit log entry. Check git log for examples on
wireless-testing, also read:

http://wireless.kernel.org/en/developers/Documentation/SubmittingPatches
http://wireless.kernel.org/en/developers/Documentation

  Luis

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ath9k-devel] [RFC] ath9k: 4ms frame length table update
  2010-03-18 16:00   ` Luis R. Rodriguez
@ 2010-03-18 16:53     ` Vasanthakumar Thiagarajan
  -1 siblings, 0 replies; 5+ messages in thread
From: Vasanthakumar Thiagarajan @ 2010-03-18 16:53 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: selvam, ath9k-devel, linux-wireless, Vipin M

On Thu, Mar 18, 2010 at 09:30:34PM +0530, Luis R. Rodriguez wrote:
> On Wed, Mar 17, 2010 at 11:37:29PM -0700, selvam wrote:
> > Hi,
> > 
> > The 4 ms frame length table is updated to support up to MCS 31.
> > 
> > These values are calculated based on the equation 9.1 from the IEEE 802.11n standard.
> > These values are rounded off to multiple of 4 bytes. If the final value is greater than 65535 then it is changed to 65532, since the maximum A-MPDU length is 65535 bytes.
> 
> Thanks for this patch, but can you elaborate on what your patch does other
> than the above. For example, you may want to mention that although the current
> ath9k driver does not support up to MCS31 your patch would enable such support
> for future chipsets which could be supported. You also forgot to Signed-off-by
> it, and provide a clearer commit log entry. Check git log for examples on
> wireless-testing, also read:
> 

Also, rate control component of ath9k is not generic, it is specific
to ath9k. So this sort of patches make sense only when ath9k supports hw with
three chains, currently ath9k does not have support for those hw.

Vasanth

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ath9k-devel] [RFC] ath9k: 4ms frame length table update
@ 2010-03-18 16:53     ` Vasanthakumar Thiagarajan
  0 siblings, 0 replies; 5+ messages in thread
From: Vasanthakumar Thiagarajan @ 2010-03-18 16:53 UTC (permalink / raw)
  To: ath9k-devel

On Thu, Mar 18, 2010 at 09:30:34PM +0530, Luis R. Rodriguez wrote:
> On Wed, Mar 17, 2010 at 11:37:29PM -0700, selvam wrote:
> > Hi,
> > 
> > The 4 ms frame length table is updated to support up to MCS 31.
> > 
> > These values are calculated based on the equation 9.1 from the IEEE 802.11n standard.
> > These values are rounded off to multiple of 4 bytes. If the final value is greater than 65535 then it is changed to 65532, since the maximum A-MPDU length is 65535 bytes.
> 
> Thanks for this patch, but can you elaborate on what your patch does other
> than the above. For example, you may want to mention that although the current
> ath9k driver does not support up to MCS31 your patch would enable such support
> for future chipsets which could be supported. You also forgot to Signed-off-by
> it, and provide a clearer commit log entry. Check git log for examples on
> wireless-testing, also read:
> 

Also, rate control component of ath9k is not generic, it is specific
to ath9k. So this sort of patches make sense only when ath9k supports hw with
three chains, currently ath9k does not have support for those hw.

Vasanth

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-18 16:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-18  6:37 [ath9k-devel] [RFC] ath9k: 4ms frame length table update selvam
2010-03-18 16:00 ` Luis R. Rodriguez
2010-03-18 16:00   ` Luis R. Rodriguez
2010-03-18 16:53   ` Vasanthakumar Thiagarajan
2010-03-18 16:53     ` Vasanthakumar Thiagarajan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.