From patchwork Mon Jul 4 11:07:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Le Magourou X-Patchwork-Id: 9212267 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A775B60572 for ; Mon, 4 Jul 2016 11:09:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97BF3286B2 for ; Mon, 4 Jul 2016 11:09:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CBA9286BD; Mon, 4 Jul 2016 11:09:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1277F286C2 for ; Mon, 4 Jul 2016 11:09:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932456AbcGDLJi (ORCPT ); Mon, 4 Jul 2016 07:09:38 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36695 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753315AbcGDLJc (ORCPT ); Mon, 4 Jul 2016 07:09:32 -0400 Received: by mail-wm0-f65.google.com with SMTP id c82so20817669wme.3 for ; Mon, 04 Jul 2016 04:09:32 -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:in-reply-to:references; bh=ReeiYGJeXd3QYJWbw/g4z0paCbFYiuPVYIxaP6f07IY=; b=nlxLY5OFIeqeTHd3+6ZR7c8+K/8lX+pfckWf6bi8XCkF9epIyLwyUq5CWypvZQ0/i4 Wz9UED73p+gH7/wneGvUtCWscE/smTfNoIoUQNVt0dltfNeDagHq92YjKiCY+nNO8GfK TbOMrREXa7Oslq5e9Db94kJd1ccMcaKtGt9/x080u5lrA7iBIFYs4V0K75lV/4am4Imy 2/0AtV2vvs+utDVE4RaSyrWXRhynx9LfNiolmhgF37m9AxWUSS2qmv4kyayHt9tNNXyI bimtnSIKhJ5lzAwwQpwCIzxPZqlgvX5xSQh+mWpYVfMOP+Iy8Sbt52Mb3To21ul6KNqr OZ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ReeiYGJeXd3QYJWbw/g4z0paCbFYiuPVYIxaP6f07IY=; b=UEPO9MOT0xhnINNwYayeaWErXujggejI0xTQIiutuENIoAL/BHL8ngCssTdRfsi26T Kkng6pCMCSvkMUU3EmsBwGo/SF082q6tSGmG1vMFYM+nEjmQpWCxSC55tkGPgExC0qY1 TDarm0zWs7kYR+M/watOLcwaWeeytbG/dgx/AwRJf4DTOhPm65yp6N+h39wkPE1x4wvn pQ/gfgMhq+QwcQcUaJW1KjDdHwF1dWPIF4zYqYNjF/n7AiK6s86VQTK4/4jxdC9C7yio Xa6/HXekyxM0KI6Gsgu1XCNiU8wVNo6R8XvJJPW1KC2XR8xOT4+GYLN31w5TLNcXzYv4 3Wqg== X-Gm-Message-State: ALyK8tLS7XKJ5eeaWFYuhnaKDJCS9bDR++oa6hARxlaVsTeb1dbf6g2T3QLeoNGsOwGKZA== X-Received: by 10.28.47.207 with SMTP id v198mr9967323wmv.40.1467630566477; Mon, 04 Jul 2016 04:09:26 -0700 (PDT) Received: from lemagoup-desktop.aldebaran.lan ([195.190.86.18]) by smtp.gmail.com with ESMTPSA id t188sm3098759wma.8.2016.07.04.04.09.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jul 2016 04:09:25 -0700 (PDT) From: lemagoup@gmail.com X-Google-Original-From: plemagourou@aldebaran.com To: kvalo@qca.qualcomm.com Cc: ath6kl@lists.infradead.org, linux-wireless@vger.kernel.org, jmassot@aldebaran.com, Pierre Le Magourou Subject: [PATCH v2 2/3] ath6kl: Fix wrong regulatory domain disconnection. Date: Mon, 4 Jul 2016 13:07:18 +0200 Message-Id: <20160704110719.7694-3-plemagourou@aldebaran.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160704110719.7694-1-plemagourou@aldebaran.com> References: <20160704110719.7694-1-plemagourou@aldebaran.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Pierre Le Magourou One minute after a successful connection, the kernel checks if the frequency and the channel width are well configured for the country we are in. (regulatory domain) ath6kl driver was setting the NL80211_CHAN_HT20 channel without checking for the HT capabilities. (we should have NL80211_CHAN_NO_HT in our case because the firmware did not support HT) This patch adds a check on ht_cap.ht_supported in order to create the channel corresponding to the firmware capabilities. Signed-off-by: Pierre Le Magourou --- drivers/net/wireless/ath/ath6kl/cfg80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 4e11ba0..c9c4d7f 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -1104,7 +1104,8 @@ void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq, cfg80211_chandef_create(&chandef, ieee80211_get_channel(vif->ar->wiphy, freq), - (mode == WMI_11G_HT20) ? + (mode == WMI_11G_HT20 && + ath6kl_band_2ghz.ht_cap.ht_supported) ? NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT); mutex_lock(&vif->wdev.mtx);