From patchwork Wed Mar 23 12:52:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouni Malinen X-Patchwork-Id: 655911 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2NDlKGM010652 for ; Wed, 23 Mar 2011 13:47:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755144Ab1CWNrT (ORCPT ); Wed, 23 Mar 2011 09:47:19 -0400 Received: from w1.fi ([128.177.27.249]:52366 "EHLO jmalinen.user.openhosting.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753118Ab1CWNrS (ORCPT ); Wed, 23 Mar 2011 09:47:18 -0400 Received: from jm (a91-155-82-171.elisa-laajakaista.fi [91.155.82.171]) (authenticated bits=0) by jmalinen.user.openhosting.com (8.13.8/8.13.8) with ESMTP id p2NCqKqS016120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Mar 2011 08:52:21 -0400 Received: by jm (sSMTP sendmail emulation); Wed, 23 Mar 2011 14:52:20 +0200 Date: Wed, 23 Mar 2011 14:52:19 +0200 From: Jouni Malinen To: "John W. Linville" Cc: linux-wireless@vger.kernel.org Subject: [PATCH] ath9k: Support RSN IBSS Message-ID: <20110323125219.GA26467@jm.kir.nu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 23 Mar 2011 13:47:21 +0000 (UTC) --- wireless-testing.orig/drivers/net/wireless/ath/ath9k/init.c 2011-03-23 14:14:12.000000000 +0200 +++ wireless-testing/drivers/net/wireless/ath/ath9k/init.c 2011-03-23 14:15:04.000000000 +0200 @@ -690,6 +690,8 @@ void ath9k_set_hw_capab(struct ath_softc if (AR_SREV_5416(sc->sc_ah)) hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; + hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; + hw->queues = 4; hw->max_rates = 4; hw->channel_change_time = 5000; --- wireless-testing.orig/drivers/net/wireless/ath/ath9k/main.c 2011-03-23 14:12:59.000000000 +0200 +++ wireless-testing/drivers/net/wireless/ath/ath9k/main.c 2011-03-23 14:15:04.000000000 +0200 @@ -1845,6 +1845,20 @@ static int ath9k_set_key(struct ieee8021 if (ath9k_modparam_nohwcrypt) return -ENOSPC; + if (vif->type == NL80211_IFTYPE_ADHOC && + (key->cipher == WLAN_CIPHER_SUITE_TKIP || + key->cipher == WLAN_CIPHER_SUITE_CCMP) && + !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { + /* + * For now, disable hw crypto for the RSN IBSS group keys. This + * could be optimized in the future to use a modified key cache + * design to support per-STA RX GTK, but until that gets + * implemented, use of software crypto for group addressed + * frames is a acceptable to allow RSN IBSS to be used. + */ + return -EOPNOTSUPP; + } + mutex_lock(&sc->mutex); ath9k_ps_wakeup(sc); ath_dbg(common, ATH_DBG_CONFIG, "Set HW Key\n");