Skip to contentSkip to conversation

iwlwifi: add the MVM driver

DISCUSSION Dan Carpenter 1 participant 1 message Feb 5, 2013

lore
Share & tools
lore
#0 lore raw

Hello Johannes Berg,

The patch 8ca151b568b6: "iwlwifi: add the MVM driver" from Jan 24, 2013, leads to the following warning:
"drivers/net/wireless/iwlwifi/mvm/sta.c:1119 iwl_mvm_remove_sta_key()

	 warn: 0x300 is larger than 8 bits"

[ This is a not ready for release Smatch check ].

drivers/net/wireless/iwlwifi/mvm/sta.c
1118

  1119          key_flags = cpu_to_le16(keyconf->keyidx & STA_KEY_FLG_KEYID_MSK);
                                        ^^^^^^^^^^^^^^^
This is s8.
                                                          ^^^^^^^^^^^^^^^^^^^^^

STA_KEY_FLG_KEYID_MSK is 0x300.

The result after the bitwise AND is always zero because 0xff & 0x300.

  1120          key_flags |= cpu_to_le16(STA_KEY_FLG_NO_ENC | STA_KEY_FLG_WEP_KEY_MAP);
  1121          key_flags |= cpu_to_le16(STA_KEY_NOT_VALID);

1122

regards,
dan carpenter