From patchwork Fri Sep 14 10:26:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Yeow Yeoh X-Patchwork-Id: 1456771 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id CC0B1402E1 for ; Fri, 14 Sep 2012 10:30:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759394Ab2INKaE (ORCPT ); Fri, 14 Sep 2012 06:30:04 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:45603 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751511Ab2INKaD (ORCPT ); Fri, 14 Sep 2012 06:30:03 -0400 Received: by pbbrr13 with SMTP id rr13so5422790pbb.19 for ; Fri, 14 Sep 2012 03:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=nb9C0y8vTYKuCBLugS8xWA+nYSfeyLS4zNUVGaOnHUY=; b=eagR4Rf15AGKMwYtoPsyaB0nwjdekBtqU20E+UMRsllHJwlsC6E0/y6cRLd/MF2isY Lou4Si0tT3HjrT3iReAWJNwns8gJqG5RBX04VaWCfILeJDITG3tf7IL5HTXatBFWEEpX 6H6SSy+36hcGkxQa0s/7p0GSQh0ClS1XLigEDJymoBW0OGczWMniC/486342A9WnnxGs 5v+eFGOgNHSCXLpYenKkhfomNCDRfEn7oV7XWitw7PvhnkyisQ9IGLVbvD1+cIfbqPOq 2wDlk6SPKopagnm7IETiq6LqEH7T5uxuQ01HVuYjMhPFdhqoqi4DdMjW3NqMi9Q+Z0EB WOxQ== Received: by 10.68.213.195 with SMTP id nu3mr4588361pbc.81.1347618603180; Fri, 14 Sep 2012 03:30:03 -0700 (PDT) Received: from localhost.localdomain ([58.26.233.146]) by mx.google.com with ESMTPS id st6sm761250pbc.58.2012.09.14.03.30.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 03:30:02 -0700 (PDT) From: Chun-Yeow Yeoh To: linux-wireless@vger.kernel.org Cc: linville@tuxdriver.com, Chun-Yeow Yeoh Subject: [PATCH] ath5k: disable HW crypto in management frame Date: Fri, 14 Sep 2012 18:26:11 +0800 Message-Id: <1347618371-31546-1-git-send-email-yeohchunyeow@gmail.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hardware support for MFP is not available in ath5k. Thus, this implementation allows the mac80211 stack to do the actuall crypto operation. Signed-off-by: Chun-Yeow Yeoh --- drivers/net/wireless/ath/ath5k/base.c | 1 + drivers/net/wireless/ath/ath5k/mac80211-ops.c | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index a0a202d..9fd6d9a 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -2446,6 +2446,7 @@ ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops) hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | IEEE80211_HW_SIGNAL_DBM | + IEEE80211_HW_MFP_CAPABLE | IEEE80211_HW_REPORTS_TX_ACK_STATUS; hw->wiphy->interface_modes = diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c index df61a09..0f34086 100644 --- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c +++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c @@ -489,6 +489,9 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, if (ath5k_modparam_nohwcrypt) return -EOPNOTSUPP; + if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) + return -EOPNOTSUPP; + if (vif->type == NL80211_IFTYPE_ADHOC && (key->cipher == WLAN_CIPHER_SUITE_TKIP || key->cipher == WLAN_CIPHER_SUITE_CCMP) &&