From: Gabor Juhos Date: Tue, 11 Aug 2009 06:47:30 +0000 (+0200) Subject: iw: fix typos in MCS set parsing code X-Git-Tag: v0.9.16~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b26aa52199898cc5fcc06f484f23d39beef0320;p=thirdparty%2Fiw.git iw: fix typos in MCS set parsing code The current code uses wrong binary operator for masking, and the shift values for the 'tx_max_num_spatial_streams' and 'tx_unequal_modulation' fields are off-by-one. Signed-off-by: Gabor Juhos Signed-off-by: Johannes Berg --- diff --git a/info.c b/info.c index 2db0fc7..542745b 100644 --- a/info.c +++ b/info.c @@ -159,8 +159,8 @@ static int print_phy_handler(struct nl_msg *msg, void *arg) 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)); + tx_max_num_spatial_streams = (mcs[12] & ((1 << 2) | (1 << 3))) + 1; + tx_unequal_modulation = !!(mcs[12] & (1 << 4)); if (max_rx_supp_data_rate) printf("\t\tHT Max RX data rate: %d Mbps\n", max_rx_supp_data_rate);