From patchwork Fri Jan 16 10:38:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 5646971 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5E57A9F357 for ; Fri, 16 Jan 2015 10:39:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A0872010F for ; Fri, 16 Jan 2015 10:39:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB78F2011D for ; Fri, 16 Jan 2015 10:39:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754199AbbAPKjg (ORCPT ); Fri, 16 Jan 2015 05:39:36 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:35400 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbbAPKjf (ORCPT ); Fri, 16 Jan 2015 05:39:35 -0500 Received: by mail-wi0-f180.google.com with SMTP id bs8so2936824wib.1 for ; Fri, 16 Jan 2015 02:39:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=J4AaPikeZgMs17+Ez/cKxFYBSXHg1dTL1e7b3cXMA4Q=; b=YFBtIw99MF4ozFWR4wsnQcWMYbiGaIcDeOsS649zIBfw5kmYTf1PPz48bzEXgIQXXw RQB4vLEu/JvoDKN8mqUIS/KBmCdedf8mQwWoiqn5+mQ/OrrVw+1L1w3pAu7cy68cz4lF eT0zbHycbl6Dtz+ThdakK0sWDO2MTsT8eRhqQ= 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; bh=J4AaPikeZgMs17+Ez/cKxFYBSXHg1dTL1e7b3cXMA4Q=; b=IGf+9GZg7eoF3Afe7ZiIuoA9kBocuHatkUDfzEya2pn++O+AHAwFntOAKLC1rhz5ec ZAVAfj9OMJuNRzbyrj+VNjFfhiQhb6F7XwndBRCJ/8eaC89muAvoZgqMy7jV2F9oxOn8 JwQL/ScFXj5voIlaSVLCuqFhPTYqFZ4DCY3JTf9bqoGHhT8b0Xq6EMwG9Rja0BkbGc3n i9JaCaYhQBzaRQC26aBL60yvemLMWZrdjlMhdzjEUXgWAkct/4thZHx/3f+RXz1OnUJk d5W2JSmyBE+aU2LaA4u8oiFtvCHiMWzqf/InZrHHm3QjQPigHE09Gh5/vCicHYtGfA+N GkAw== X-Gm-Message-State: ALoCoQkGFh1PC/wSSUtj65XJREkHfqvjb3BaB/PF4EjQQijIkg3l9DUzF5CfULUCN2f+6f1G1H1RBWzi6Fi+YUR0qtLJ0bxIJrSWgSOaGEqJaWsoQKa5aR4TJpiHH5nnI4x36pMBz5hugq3pLQu4Z3+3ZbBAl1vzERTlC6hpUm3g5MmYeklhRTjbKTcFL7wzz/1UcnJ8IGVV X-Received: by 10.180.85.4 with SMTP id d4mr4913291wiz.36.1421404773865; Fri, 16 Jan 2015 02:39:33 -0800 (PST) Received: from localhost.localdomain (apn-46-76-65-212.dynamic.gprs.plus.pl. [46.76.65.212]) by mx.google.com with ESMTPSA id bo5sm148423wjc.39.2015.01.16.02.39.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Jan 2015 02:39:33 -0800 (PST) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Janusz Dziedzic Subject: [RFCv2 1/6] mac80211: ibss, fix chandef setup for HT40 Date: Fri, 16 Jan 2015 11:38:39 +0100 Message-Id: <1421404724-32326-1-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In some cases when used HT40+/HT40-, center_freq1 was configured incorrectly. Next this couse fall back to HT20. Signed-off-by: Janusz Dziedzic --- net/mac80211/ibss.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index b606b53..13b8105 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -407,10 +407,15 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, switch (sdata->u.ibss.chandef.width) { case NL80211_CHAN_WIDTH_20_NOHT: case NL80211_CHAN_WIDTH_20: - case NL80211_CHAN_WIDTH_40: chan_type = cfg80211_get_chandef_type(&sdata->u.ibss.chandef); cfg80211_chandef_create(&chandef, cbss->channel, chan_type); break; + case NL80211_CHAN_WIDTH_40: + cfg80211_chandef_create(&chandef, cbss->channel, + NL80211_CHAN_WIDTH_20_NOHT); + chandef.width = sdata->u.ibss.chandef.width; + chandef.center_freq1 = sdata->u.ibss.chandef.center_freq1; + break; case NL80211_CHAN_WIDTH_5: case NL80211_CHAN_WIDTH_10: cfg80211_chandef_create(&chandef, cbss->channel,