From patchwork Fri Jul 1 16:10:04 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: 9210141 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 33789607D8 for ; Fri, 1 Jul 2016 16:11:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2541628516 for ; Fri, 1 Jul 2016 16:11:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A0EE2867A; Fri, 1 Jul 2016 16:11:02 +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 E381E28516 for ; Fri, 1 Jul 2016 16:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752250AbcGAQK7 (ORCPT ); Fri, 1 Jul 2016 12:10:59 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33909 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752242AbcGAQK6 (ORCPT ); Fri, 1 Jul 2016 12:10:58 -0400 Received: by mail-wm0-f66.google.com with SMTP id 187so6344367wmz.1 for ; Fri, 01 Jul 2016 09:10:45 -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=TBqxKLNrr8CqOirUvr9aXwSN3uJWoushrC3IRJ4+beE=; b=GbbLuXgO+A/p3P5TkGR1BqiYRuD6tjdbT+0CMj5X48AtbdPpYFStvUy0LlJbyn9TLV Y7b+A3ifioZnUR3SnrxKuF9gLnmm5cx3XCw6sj0hCoaajJqyi0GhxJ9m8bMwxqiwThs2 pCvL3+yYkezIPbXWi2PwyPxd8aV39w0rAvzyaCvkWbZ6gR9G76qjxFZVyL4Ip7hZGkbN mzjUQN3xxEaU7CqVSPa/LP1jUieVw5d5T9+qLE21hxJlNojMwA3GUayhG6Bh4b2nQ6bw IuS5bb+Ph0iY29o0urgOVsHjLoDwo+BS2eC4vidWDTdxMXMosFYaSRZzPbJsCGh6bEYu 49VA== 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=TBqxKLNrr8CqOirUvr9aXwSN3uJWoushrC3IRJ4+beE=; b=HVNBD79Z/2/OjoJvUIUSZO+5bZ63SvBPw9B9FHJT2PPhN9V5k5MhomEkmOfmGGniio midqHN331eNZXa28qdyEHTEOqiWfcAcPeQXKl22vxZTO8B6ubcSWBGmFFel1f5VQbenf bJlQ9FUu/1wGw6AHWJ9DXrsoKMAqadOd6L9oR/byMq7dPf0UNn348OSTOlV1dNvJmkIA kn89p38QESejUkCAsg3NoJ/6DPVhF7AkTfzJ9CDCwJmjW5S76a49zGBZ+ZeQH40vaHBL FRFaNdshBNLp0fnfOhWjqrBNEVf2jE3jPXMR1ZJR+pL44w4z3dPM4nLv/mbtOQEB4ciy dUNg== X-Gm-Message-State: ALyK8tI0pr+DxRCO0O4efZE/66Euu7TiCXPgEqwtGhGQa9yMTcQsBUG9BLqX34XPm3ZQPA== X-Received: by 10.194.47.71 with SMTP id b7mr4350191wjn.107.1467389439421; Fri, 01 Jul 2016 09:10:39 -0700 (PDT) Received: from lemagoup-desktop.aldebaran.lan ([195.190.86.18]) by smtp.gmail.com with ESMTPSA id q203sm409554wmd.24.2016.07.01.09.10.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jul 2016 09:10:39 -0700 (PDT) From: Pierre Le Magourou X-Google-Original-From: Pierre Le Magourou To: kvalo@qca.qualcomm.com Cc: ath6kl@lists.infradead.org, linux-wireless@vger.kernel.org, jmassot@aldebaran.com, Pierre Le Magourou Subject: [PATCH 2/3] ath6kl: Fix wrong regulatory domain disconnection. Date: Fri, 1 Jul 2016 18:10:04 +0200 Message-Id: <20160701161005.30341-3-plemagourou@aldebaran.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160701161005.30341-1-plemagourou@aldebaran.com> References: <20160701161005.30341-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 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);