Message ID | 1421097491-29574-1-git-send-email-linville@tuxdriver.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Johannes Berg |
Headers | show |
On Mon, 2015-01-12 at 16:18 -0500, John W. Linville wrote: > Add a comment indicating that the WLAN_CIPHER_SUITE_WEP104 case falls > through to the WLAN_CIPHER_SUITE_WEP40 case in iwl_mvm_send_sta_key. > This will document that the lack of a break is intentional. > > Coverity: CID 1260023 > > Signed-off-by: John W. Linville <linville@tuxdriver.com> > --- > This seems to work, so I'm guessing that the fall-through is > intentional... Yeah, it is. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
T24gTW9uLCAyMDE1LTAxLTEyIGF0IDE2OjE4IC0wNTAwLCBKb2huIFcuIExpbnZpbGxlIHdyb3Rl Og0KPiBBZGQgYSBjb21tZW50IGluZGljYXRpbmcgdGhhdCB0aGUgV0xBTl9DSVBIRVJfU1VJVEVf V0VQMTA0IGNhc2UgZmFsbHMNCj4gdGhyb3VnaCB0byB0aGUgV0xBTl9DSVBIRVJfU1VJVEVfV0VQ NDAgY2FzZSBpbiBpd2xfbXZtX3NlbmRfc3RhX2tleS4NCj4gVGhpcyB3aWxsIGRvY3VtZW50IHRo YXQgdGhlIGxhY2sgb2YgYSBicmVhayBpcyBpbnRlbnRpb25hbC4NCj4gDQo+IENvdmVyaXR5OiBD SUQgMTI2MDAyMw0KPiANCj4gU2lnbmVkLW9mZi1ieTogSm9obiBXLiBMaW52aWxsZSA8bGludmls bGVAdHV4ZHJpdmVyLmNvbT4NCj4gLS0tDQo+IFRoaXMgc2VlbXMgdG8gd29yaywgc28gSSdtIGd1 ZXNzaW5nIHRoYXQgdGhlIGZhbGwtdGhyb3VnaCBpcw0KPiBpbnRlbnRpb25hbC4uLg0KPiANCj4g IGRyaXZlcnMvbmV0L3dpcmVsZXNzL2l3bHdpZmkvbXZtL3N0YS5jIHwgMSArDQo+ICAxIGZpbGUg Y2hhbmdlZCwgMSBpbnNlcnRpb24oKykNCj4gDQo+IGRpZmYgLS1naXQgYS9kcml2ZXJzL25ldC93 aXJlbGVzcy9pd2x3aWZpL212bS9zdGEuYyBiL2RyaXZlcnMvbmV0L3dpcmVsZXNzL2l3bHdpZmkv bXZtL3N0YS5jDQo+IGluZGV4IGQ4NmZlNDMyZTUxZi4uYzBmYzRmYzAxNjFiIDEwMDY0NA0KPiAt LS0gYS9kcml2ZXJzL25ldC93aXJlbGVzcy9pd2x3aWZpL212bS9zdGEuYw0KPiArKysgYi9kcml2 ZXJzL25ldC93aXJlbGVzcy9pd2x3aWZpL212bS9zdGEuYw0KPiBAQCAtMTE5Niw2ICsxMTk2LDcg QEAgc3RhdGljIGludCBpd2xfbXZtX3NlbmRfc3RhX2tleShzdHJ1Y3QgaXdsX212bSAqbXZtLA0K PiAgCQlicmVhazsNCj4gIAljYXNlIFdMQU5fQ0lQSEVSX1NVSVRFX1dFUDEwNDoNCj4gIAkJa2V5 X2ZsYWdzIHw9IGNwdV90b19sZTE2KFNUQV9LRVlfRkxHX1dFUF8xM0JZVEVTKTsNCj4gKwkJLyog ZmFsbCB0aHJvdWdoICovDQo+ICAJY2FzZSBXTEFOX0NJUEhFUl9TVUlURV9XRVA0MDoNCj4gIAkJ a2V5X2ZsYWdzIHw9IGNwdV90b19sZTE2KFNUQV9LRVlfRkxHX1dFUCk7DQo+ICAJCW1lbWNweShj bWQua2V5ICsgMywga2V5Y29uZi0+a2V5LCBrZXljb25mLT5rZXlsZW4pOw0KDQpBcHBsaWVkIC0g dGhhbmtzLg0K -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c index d86fe432e51f..c0fc4fc0161b 100644 --- a/drivers/net/wireless/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/iwlwifi/mvm/sta.c @@ -1196,6 +1196,7 @@ static int iwl_mvm_send_sta_key(struct iwl_mvm *mvm, break; case WLAN_CIPHER_SUITE_WEP104: key_flags |= cpu_to_le16(STA_KEY_FLG_WEP_13BYTES); + /* fall through */ case WLAN_CIPHER_SUITE_WEP40: key_flags |= cpu_to_le16(STA_KEY_FLG_WEP); memcpy(cmd.key + 3, keyconf->key, keyconf->keylen);
Add a comment indicating that the WLAN_CIPHER_SUITE_WEP104 case falls through to the WLAN_CIPHER_SUITE_WEP40 case in iwl_mvm_send_sta_key. This will document that the lack of a break is intentional. Coverity: CID 1260023 Signed-off-by: John W. Linville <linville@tuxdriver.com> --- This seems to work, so I'm guessing that the fall-through is intentional... drivers/net/wireless/iwlwifi/mvm/sta.c | 1 + 1 file changed, 1 insertion(+)