On Fri, Jan 30, 2009 at 05:23:06PM -0800, Chris Kennedy wrote:
> 
> On Jan 30, 2009, at 11:39 AM, Luis R. Rodriguez wrote:
> >
> > Jouni found there was an issue with this patch which breaks
> > AP mode.
> >
> > commit e22cab741afdd1e9857ea9fe51e28a6fe3c97b90
> > Author: Stephen Hemminger <[email protected]>
> > Date:   Tue Jan 27 05:29:25 2009 +1100
> >
> >     mac80211: convert to net_device_ops
> >
> >     Convert to new net_device_ops in 2.6.28 and later.
> >
> >     Signed-off-by: Stephen Hemminger <[email protected]>
> >     Acked-by: Johannes Berg <[email protected]>
> >     Signed-off-by: John W. Linville <[email protected]
> >
> > ---
> >
> > Johannes just posted some patches to correct, this you may
> > wnat to try those out, or wait until they get merged.
> >
> >   Luis
> 
> 
> Great, it does seem to allow me to connect now with the newest
> wireless-testing.
> The bad part though is it won't connect above 11Mbps now, although
> iperf shows
> it definitely gets all 11 Mbit of bandwidth, but nothing more.  (and
> of course using 802.11n)

Keep in mind getting 11 Mbit/s on throughput is not the same as
using 11 Mbit/s rate on the card. For example an average 802.11g
capable card using 54 Mbit/s can achieve around ~ 20-25 Mbit/s
although it will probably will actually be using the 54 Mbit/s
OFDM rate. Regardless getting only 11 Mbit/s throughput with an
11N AP and 11N STA is pretty bad.

What cards are you using for STAs? How about for AP (AR5416, or AR9280 or what)?

> Is this because of the iw list output showing that (short preamble
> supported) for 2,5.5 and 11Mbps?

No, that just means its an option.

> Here's the current iw list output now...
> 
> 
> Wiphy phy0
>          Band 1:
>                  HT capabilities: 0x104e
>                           * 20/40 MHz operation
>                           * SM PS disabled
>                           * 40 MHz short GI
>                           * max A-MSDU len 3839
>                           * DSSS/CCK 40 MHz
>                  HT A-MPDU factor: 0x0003 (65535 bytes)
>                  HT A-MPDU density: 0x0006 (8 usec)
>                  HT MCS set: ff ff 00 00 00 00 00 00 00 00 00 00 01
> 00 00 00

The above "HT MCS set" gives you the actual supported RX/TX MCS rates.
I just sent a patch to parse this out, I've attached it for your
convenience.

>                  Frequencies:
>                          * 2412 MHz [1] (27.0 dBm)
>                          * 2417 MHz [2] (27.0 dBm)
>                          * 2422 MHz [3] (27.0 dBm)
>                          * 2427 MHz [4] (27.0 dBm)
>                          * 2432 MHz [5] (27.0 dBm)
>                          * 2437 MHz [6] (27.0 dBm)
>                          * 2442 MHz [7] (27.0 dBm)
>                          * 2447 MHz [8] (27.0 dBm)
>                          * 2452 MHz [9] (27.0 dBm)
>                          * 2457 MHz [10] (27.0 dBm)
>                          * 2462 MHz [11] (27.0 dBm)
>                          * 2467 MHz [12] (disabled)
>                          * 2472 MHz [13] (disabled)
>                          * 2484 MHz [14] (disabled)
>                  Bitrates:

This should say "Legacy Bitrates" or something like this list
won't show the supported MCS rates, that is listed in the patch
I posted.

>                          * 1.0 Mbps
>                          * 2.0 Mbps (short preamble supported)
>                          * 5.5 Mbps (short preamble supported)
>                          * 11.0 Mbps (short preamble supported)
>                          * 6.0 Mbps
>                          * 9.0 Mbps
>                          * 12.0 Mbps
>                          * 18.0 Mbps
>                          * 24.0 Mbps
>                          * 36.0 Mbps
>                          * 48.0 Mbps
>                          * 54.0 Mbps
>          Supported interface modes:
>                   * IBSS
>                   * Station
>                   * AP
>                   * AP(VLAN)
>                   * Monitor
> 

  Luis

From: Luis R. Rodriguez <[email protected]>
[PATCH] iw: add MCS set parsing (RX/TX MCS rates)

This adds MCS set parsing to iw. When you can 'iw list' you can
now see the MCS set actually parsed, this can tell you information
such as all the RX/TX MCS indexes supported, max TX spatial streams,
if TX unequal modulation is supported and your max supported HT
RX data rate.

This is as per 802.11n Draft 7 on section 7.3.2.57.4 Supported MCS Set field.

Signed-off-by: Luis R. Rodriguez <[email protected]>
---

I don't see anything on the max HT RX rate though, so cannot test that.
My HT APs are also being shipped from NJ so I have no APs to test against
which I can go and tweak to ensure HT is enabled as I want. Please test
and review.

 info.c |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/info.c b/info.c
index bf3b8bd..cabd4b6 100644
--- a/info.c
+++ b/info.c
@@ -1,3 +1,4 @@
+#include <stdbool.h>
 #include <errno.h>
 #include <net/if.h>
 
@@ -20,6 +21,24 @@ static void print_flag(const char *name, int *open)
        *open = 1;
 }
 
+static void print_mcs_index(unsigned char *mcs)
+{
+       unsigned int mcs_bit;
+
+       for (mcs_bit = 0; mcs_bit <= 76; mcs_bit++) {
+               unsigned int mcs_octet = mcs_bit/8;
+               unsigned int MCS_RATE_BIT = 1 << mcs_bit % 8;
+               bool mcs_rate_idx_set;
+
+               mcs_rate_idx_set = !!(mcs[mcs_octet] & MCS_RATE_BIT);
+
+               if (!mcs_rate_idx_set)
+                       continue;
+
+               printf("\t\t\tMCS index %d\n", mcs_bit);
+       }
+}
+
 static int print_phy_handler(struct nl_msg *msg, void *arg)
 {
        struct nlattr *tb_msg[NL80211_ATTR_MAX + 1];
@@ -128,10 +147,48 @@ static int print_phy_handler(struct nl_msg *msg, void 
*arg)
                }
                if (tb_band[NL80211_BAND_ATTR_HT_MCS_SET] &&
                    nla_len(tb_band[NL80211_BAND_ATTR_HT_MCS_SET]) == 16) {
+                       /* As defined in 7.3.2.57.4 Supported MCS Set field */
+                       unsigned int tx_max_num_spatial_streams, 
max_rx_supp_data_rate;
                        unsigned char *mcs = 
nla_data(tb_band[NL80211_BAND_ATTR_HT_MCS_SET]);
+                       bool tx_mcs_set_defined, tx_mcs_set_equal, 
tx_unequal_modulation;
+
                        printf("\t\tHT MCS set: %.2x %.2x %.2x %.2x %.2x %.2x 
%.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x\n",
                                mcs[0], mcs[1], mcs[2], mcs[3], mcs[4], mcs[5], 
mcs[6], mcs[7],
                                mcs[8], mcs[9], mcs[10], mcs[11], mcs[12], 
mcs[13], mcs[14], mcs[15]);
+
+                       max_rx_supp_data_rate = ((mcs[10] >> 8) & ((mcs[11] & 
0x3) << 8));
+                       tx_mcs_set_defined = !!(mcs[12] & (1 << 0));
+                       tx_mcs_set_equal = !(mcs[12] & (1 << 1));
+                       tx_max_num_spatial_streams = (mcs[12] | ((1 << 3) | (1 
<< 4))) + 1;
+                       tx_unequal_modulation = !!(mcs[12] & (1 << 5));
+
+                       printf("\t\tHT Max RX data rate: %d Mbps\n", 
max_rx_supp_data_rate);
+
+                       if (tx_mcs_set_defined) {
+                               if (tx_mcs_set_equal) {
+                                       printf("\t\tHT TX/RX MCS rate indexes 
supported:\n");
+                                       print_mcs_index(&mcs[0]);
+                               } else {
+                                       printf("\t\tHT RX MCS rate indexes 
supported:\n");
+                                       print_mcs_index(&mcs[0]);
+
+                                       if (tx_unequal_modulation)
+                                               printf("TX unequal modulation 
supported\n");
+                                       else
+                                               printf("TX unequal modulation 
not supported\n");
+
+                                       printf("\t\tHT TX Max spatiel streams: 
%d\n",
+                                               tx_max_num_spatial_streams);
+
+                                       printf("\t\tHT TX MCS rate indexes 
supported may differ\n");
+                               }
+                       }
+                       else {
+                               printf("\t\tHT RX MCS rate indexes 
supported:\n");
+                               print_mcs_index(&mcs[0]);
+                               printf("\t\tHT TX MCS rates indexes are 
undefined\n");
+                       }
+
                }
 #endif
 
-- 
1.6.1.2.253.ga34a

_______________________________________________
ath9k-devel mailing list
[email protected]
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to