re: iwlwifi: add the MVM driver

From: Dan Carpenter <hidden>
Date: 2013-02-05 08:04:21

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help