From patchwork Mon Jan 12 21:18:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John W. Linville" X-Patchwork-Id: 5616531 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E86ED9F357 for ; Mon, 12 Jan 2015 21:30:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 113222041F for ; Mon, 12 Jan 2015 21:30:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 41EF4203C0 for ; Mon, 12 Jan 2015 21:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751453AbbALVaP (ORCPT ); Mon, 12 Jan 2015 16:30:15 -0500 Received: from charlotte.tuxdriver.com ([70.61.120.58]:32992 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751357AbbALVaN (ORCPT ); Mon, 12 Jan 2015 16:30:13 -0500 Received: from uucp by smtp.tuxdriver.com with local-rmail (Exim 4.63) (envelope-from ) id 1YAmYq-0006ru-Eq; Mon, 12 Jan 2015 16:30:08 -0500 Received: from linville-x1.hq.tuxdriver.com (localhost.localdomain [127.0.0.1]) by linville-x1.hq.tuxdriver.com (8.14.9/8.14.6) with ESMTP id t0CLIEfX029614; Mon, 12 Jan 2015 16:18:14 -0500 Received: (from linville@localhost) by linville-x1.hq.tuxdriver.com (8.14.9/8.14.9/Submit) id t0CLIDxs029613; Mon, 12 Jan 2015 16:18:13 -0500 From: "John W. Linville" To: linux-wireless@vger.kernel.org Cc: Emmanuel Grumbach , Kalle Valo , ilw@linux.intel.com, "John W. Linville" Subject: [PATCH] iwlwifi: document switch case fall-through in iwl_mvm_send_sta_key Date: Mon, 12 Jan 2015 16:18:11 -0500 Message-Id: <1421097491-29574-1-git-send-email-linville@tuxdriver.com> X-Mailer: git-send-email 2.1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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(+) 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);