From patchwork Wed Apr 2 13:31:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rostislav Lisovy X-Patchwork-Id: 3928721 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1FC2ABF540 for ; Wed, 2 Apr 2014 13:32:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E1CD20200 for ; Wed, 2 Apr 2014 13:32:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EE27201FD for ; Wed, 2 Apr 2014 13:32:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932266AbaDBNcP (ORCPT ); Wed, 2 Apr 2014 09:32:15 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:39276 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932262AbaDBNcL (ORCPT ); Wed, 2 Apr 2014 09:32:11 -0400 Received: by mail-wi0-f169.google.com with SMTP id hm4so6550312wib.2 for ; Wed, 02 Apr 2014 06:32:10 -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=9Jp9SzMsj28yW58CQpp1eFLSJs6di7/5CBf1vuqLjEw=; b=O37dj378MoneauOJ21xNa4wxRQDmbtqIX0GbrnwMzJkBvD567dMWWvzA/7yb42TCsN /p3p4nqbIknfVg5PRpTw+nNswAr46BNDdOGTiVj6fDEuH2k5G1mFo9BDngQSmFtYHbV/ 6XroEEMblMJX+pZri+aiQfBggW/YXz+Bz9x/Alo9nbfR98Eacj7reECS44R+SQaDA1wk BcBUosq9ssXwtB2eldsgXQpw1326esEkfEBQvjm9BtIVlpbQWgGyOiMeJFKoUv4RJGeT FvLxPxjgj9e0gYSQj/x8c+Nv4XuOuuLytcARjYZ6V7NdJcufRCBF0uwc6DcZVekNdCCX 1jfg== X-Received: by 10.180.211.208 with SMTP id ne16mr28694876wic.21.1396445530296; Wed, 02 Apr 2014 06:32:10 -0700 (PDT) Received: from c2c-vostro1.felk.cvut.cz ([147.32.86.112]) by mx.google.com with ESMTPSA id y7sm4593119eev.5.2014.04.02.06.32.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Apr 2014 06:32:09 -0700 (PDT) From: Rostislav Lisovy To: Johannes Berg , "John W. Linville" , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michal Sojka , s.sander@nordsys.de, jan-niklas.meier@volkswagen.de, Rostislav Lisovy Subject: [PATCH 4/4] mac80211: Update conf_is_ht() to work properly with 5/10MHz channels Date: Wed, 2 Apr 2014 15:31:55 +0200 Message-Id: <1396445515-5808-5-git-send-email-rostislav.lisovy@fel.cvut.cz> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1396445515-5808-1-git-send-email-rostislav.lisovy@fel.cvut.cz> References: <1396445515-5808-1-git-send-email-rostislav.lisovy@fel.cvut.cz> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 The channels with 5/10MHz bandwidth are not HT. We have to reflect this in conf_is_ht() function which returns whether the particular channel is HT or not. Signed-off-by: Rostislav Lisovy --- include/net/mac80211.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index f4ab2fb..f56e45b 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -4585,7 +4585,9 @@ conf_is_ht40(struct ieee80211_conf *conf) static inline bool conf_is_ht(struct ieee80211_conf *conf) { - return conf->chandef.width != NL80211_CHAN_WIDTH_20_NOHT; + return (conf->chandef.width != NL80211_CHAN_WIDTH_5) && + (conf->chandef.width != NL80211_CHAN_WIDTH_10) && + (conf->chandef.width != NL80211_CHAN_WIDTH_20_NOHT); } static inline enum nl80211_iftype