]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - util.c
iw: free memory on scan parse errors
[thirdparty/iw.git] / util.c
diff --git a/util.c b/util.c
index ce4b0ac0ceaef35ee19d697694d1c30f766aae8e..411fea1b7d818cfcdb277804feb9ec49bc902124 100644 (file)
--- a/util.c
+++ b/util.c
@@ -133,6 +133,7 @@ static const char *ifmodes[NL80211_IFTYPE_MAX + 1] = {
        "P2P-client",
        "P2P-GO",
        "P2P-device",
+       "outside context of a BSS",
 };
 
 static char modebuf[100];
@@ -252,6 +253,13 @@ static const char *commands[NL80211_CMD_MAX + 1] = {
        [NL80211_CMD_SET_COALESCE] = "set_coalesce",
        [NL80211_CMD_CHANNEL_SWITCH] = "channel_switch",
        [NL80211_CMD_VENDOR] = "vendor",
+       [NL80211_CMD_SET_QOS_MAP] = "set_qos_map",
+       [NL80211_CMD_ADD_TX_TS] = "add_tx_ts",
+       [NL80211_CMD_DEL_TX_TS] = "del_tx_ts",
+       [NL80211_CMD_GET_MPP] = "get_mpp",
+       [NL80211_CMD_JOIN_OCB] = "join_ocb",
+       [NL80211_CMD_LEAVE_OCB] = "leave_ocb",
+       [NL80211_CMD_CH_SWITCH_STARTED_NOTIFY] = "ch_switch_started_notify",
 };
 
 static char cmdbuf[100];
@@ -594,7 +602,7 @@ void print_ht_mcs(const __u8 *mcs)
        unsigned int tx_max_num_spatial_streams, max_rx_supp_data_rate;
        bool tx_mcs_set_defined, tx_mcs_set_equal, tx_unequal_modulation;
 
-       max_rx_supp_data_rate = (mcs[10] & ((mcs[11] & 0x3) << 8));
+       max_rx_supp_data_rate = (mcs[10] | ((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] >> 2) & 3) + 1;