]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
print PHY membership selector only for membership rates
authorJohannes Berg <johannes.berg@intel.com>
Thu, 13 Oct 2011 17:50:38 +0000 (19:50 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 13 Oct 2011 17:50:38 +0000 (19:50 +0200)
802.11 states
... each BSS membership selector contained in the
BSSMembershipSelectorSet parameter is encoded as an octet with
the MSB (bit 7) set to 1, and bits 6 through 0 are set to the
encoded value for the selector as found in Table 7-26a (e.g.: an
HT PHY BSS membership selector ...)"

scan.c

diff --git a/scan.c b/scan.c
index bf844fc009e6a5dd4d626c21ae9b270792bdd5a1..86551b38db13215f0141b8923d6892355f801ed2 100644 (file)
--- a/scan.c
+++ b/scan.c
@@ -169,7 +169,7 @@ static void print_supprates(const uint8_t type, uint8_t len, const uint8_t *data
        for (i = 0; i < len; i++) {
                int r = data[i] & 0x7f;
 
-               if (r == BSS_MEMBERSHIP_SELECTOR_HT_PHY)
+               if (r == BSS_MEMBERSHIP_SELECTOR_HT_PHY && data[i] & 0x80)
                        printf("HT");
                else
                        printf("%d.%d", r/2, 5*(r&1));