From patchwork Sun May 1 02:30:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naveen Singh X-Patchwork-Id: 744862 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 p412Uvpa029345 for ; Sun, 1 May 2011 02:30:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752131Ab1EACao (ORCPT ); Sat, 30 Apr 2011 22:30:44 -0400 Received: from mail.atheros.com ([12.19.149.2]:61617 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752025Ab1EACan (ORCPT ); Sat, 30 Apr 2011 22:30:43 -0400 Received: from mail.atheros.com ([10.10.20.108]) by sidewinder.atheros.com for ; Sat, 30 Apr 2011 19:30:16 -0700 Received: from smtp.atheros.com (10.10.19.157) by SC1EXHC-02.global.atheros.com (10.234.20.111) with Microsoft SMTP Server id 8.2.213.0; Sat, 30 Apr 2011 19:30:39 -0700 Received: by smtp.atheros.com (sSMTP sendmail emulation); Sat, 30 Apr 2011 19:30:40 -0700 From: Naveen Singh To: CC: , , Naveen Singh Subject: Date: Sat, 30 Apr 2011 19:30:38 -0700 Message-ID: <1304217038-1654-1-git-send-email-sningh@atheros.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 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]); Sun, 01 May 2011 02:30:58 +0000 (UTC) From: Naveen Singh The WPA-PSK association was not going through with 2.6.38 kernel. It was found that supplicant was not able to set the PTK key. On further analysis it was found that the function nl80211_set_key in file net/wireless/nl80211.c is returning with code as -EOPNOTSUPP. This function has been modified to check for the flag "WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS"in wiphy struct. If this flag is not set in the driver init, it returns from here thereby causing the association to fail. The solution is to set this flag in driver init as there would be separate default keys for unicast and multicast packets. Signed-off-by: Naveen Singh --- drivers/staging/ath6kl/os/linux/cfg80211.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c index e87d3aa..ec22408 100644 --- a/drivers/staging/ath6kl/os/linux/cfg80211.c +++ b/drivers/staging/ath6kl/os/linux/cfg80211.c @@ -1455,6 +1455,11 @@ ar6k_cfg80211_init(struct device *dev) wdev->wiphy->cipher_suites = cipher_suites; wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); + /*Support the seprate keys for unicast and multicast packets + *This flag is needed because because nl80211 checks for this + *flag before calling cfg ops for setting the key.*/ + wdev->wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS; + ret = wiphy_register(wdev->wiphy); if(ret < 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,