From patchwork Sat Dec 15 22:18:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1905801 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 E8BBE3FCA5 for ; Sat, 22 Dec 2012 14:52:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751226Ab2LVOwo (ORCPT ); Sat, 22 Dec 2012 09:52:44 -0500 Received: from mail-wg0-f48.google.com ([74.125.82.48]:34500 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144Ab2LVOwo (ORCPT ); Sat, 22 Dec 2012 09:52:44 -0500 Received: by mail-wg0-f48.google.com with SMTP id dt10so2538513wgb.15 for ; Sat, 22 Dec 2012 06:52:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:from:date:subject:to:cc; bh=h8xylcfRg7zx7hUuI9qFdT1xrhCW1OhTvjbgbtIQlbU=; b=h6Ex9eCJMz68Ffv4B44LWAREChIoFCeN4D/sy/7RsLHKjaq7fNqIVV3vzHVTLI2qQw FZFgkzlgb/CZ/qj9tTIHlTxa3iu93YNH4NfozKDmi/SUTWv5KblsWC8LfyOLRfqfNyjI uW+Gw2SKJmkOpdpejiS+iYkjM6N4afpm9bUISXHvXVbzp2QoRsFZd0CQL+DR/ApokaWU 0lpE0F3QGcmlGfYdm/c12OGwS7PrltbIKsec/XcbK+0t7ud7hb76F1fVGDFHx9q23Glp UXEw2h7pMPuRq1J+38TqiIqnYMMQ+QUY85CK2Z3nXQpynsm7OFDLXM6iSvlGu18ly+He DhMg== X-Received: by 10.180.79.37 with SMTP id g5mr27702997wix.8.1356187569430; Sat, 22 Dec 2012 06:46:09 -0800 (PST) Received: from debian64.localnet (pD9F88B3A.dip.t-dialin.net. [217.248.139.58]) by mx.google.com with ESMTPS id gz3sm34500784wib.2.2012.12.22.06.46.08 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 22 Dec 2012 06:46:08 -0800 (PST) Received: from localhost ([127.0.0.1] helo=debian64.localnet ident=chuck) by debian64.localnet with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1TmQL0-0004Aa-2l; Sat, 22 Dec 2012 15:46:06 +0100 Message-Id: <8f92b38a456c1dd901ce2022fcb66609a5b8ac4b.1356186145.git.chunkeey@googlemail.com> From: Christian Lamparter Date: Sat, 15 Dec 2012 23:18:06 +0100 Subject: [PATCH 1/8] carl9170: advertise support for TDLS To: linux-wireless@vger.kernel.org Cc: linville@tuxdriver.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Based on a quick test [ath9k and carl9170], TDLS seemed to be working fine. And while we are at it, let's move the wiphy feature flag set from carl9170_alloc into a single place in carl9170_fw. Signed-off-by: Christian Lamparter --- drivers/net/wireless/ath/carl9170/fw.c | 6 +++++- drivers/net/wireless/ath/carl9170/main.c | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c index aaebecd..5a8a9f8 100644 --- a/drivers/net/wireless/ath/carl9170/fw.c +++ b/drivers/net/wireless/ath/carl9170/fw.c @@ -354,7 +354,11 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len) ar->hw->wiphy->interface_modes |= if_comb_types; - ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; + ar->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; + + /* As IBSS Encryption is software-based, IBSS RSN is supported. */ + ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL | + WIPHY_FLAG_IBSS_RSN | WIPHY_FLAG_SUPPORTS_TDLS; #undef SUPPORTED return carl9170_fw_tx_sequence(ar); diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c index 25a1e2f..9dce200 100644 --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c @@ -1805,10 +1805,6 @@ void *carl9170_alloc(size_t priv_size) for (i = 0; i < ARRAY_SIZE(ar->noise); i++) ar->noise[i] = -95; /* ATH_DEFAULT_NOISE_FLOOR */ - hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; - - /* As IBSS Encryption is software-based, IBSS RSN is supported. */ - hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; return ar; err_nomem: