From patchwork Thu Jan 1 11:43:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 5556551 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 AF2BB9F2ED for ; Thu, 1 Jan 2015 11:43:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC99A200FE for ; Thu, 1 Jan 2015 11:43:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 051F5200F3 for ; Thu, 1 Jan 2015 11:43:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751697AbbAALnV (ORCPT ); Thu, 1 Jan 2015 06:43:21 -0500 Received: from mail-wg0-f41.google.com ([74.125.82.41]:35802 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487AbbAALnU (ORCPT ); Thu, 1 Jan 2015 06:43:20 -0500 Received: by mail-wg0-f41.google.com with SMTP id y19so23079605wgg.28 for ; Thu, 01 Jan 2015 03:43:19 -0800 (PST) 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=S7aMu29n+IkPeJP1uUiOewR8KnAzHXlbZA4E3xqJrMQ=; b=cIfOa65zTZXKtpK/1c8Vn/f4PWrAg9ZOhFymWO4llNHiyQn0ptdIVkS9rARmc5XQtt 8EzR78kxgKTEqecP8Nc4LYkPLo1+6TfWBPleWiFFWPoS42OsxYXq07HSSEl/AZEQDUo4 eQJZpCB6NeyXSmaJv2zlokZhcS82EyTyFh8I+UTQ53W31stKDJbiOG9qm+jjsRk1ymFg 8PGP2dtWlzL6PRFFnApswsyWJNoJwYIJzSZi4ht+h9pWCdONXbBQpNEoMZnV1kMxLwZW 9HvTA2pmeJiRLdp60nOvTu2UwN2x7NKf8fJJchWmKEYq9n9wdpFW5vbCizu4FUzcgpb7 lmIg== X-Gm-Message-State: ALoCoQnTQva338ShZzdPJKCvQfu4mRhvUB3aBh31a1AB2QXtdbISJEdU3XCiYY7rH1ZPYU3S3Ixu X-Received: by 10.180.78.73 with SMTP id z9mr121677669wiw.52.1420112599116; Thu, 01 Jan 2015 03:43:19 -0800 (PST) Received: from athena.ger.corp.intel.com (85-250-108-142.bb.netvision.net.il. [85.250.108.142]) by mx.google.com with ESMTPSA id cp4sm60904093wjb.16.2015.01.01.03.43.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Jan 2015 03:43:18 -0800 (PST) From: Arik Nemtsov To: Cc: Johannes Berg , Arik Nemtsov Subject: [PATCH] mac80211: skip disabled channels in VHT check Date: Thu, 1 Jan 2015 13:43:17 +0200 Message-Id: <1420112597-4035-1-git-send-email-arik@wizery.com> X-Mailer: git-send-email 2.1.0 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 The patch "40a11ca mac80211: check if channels allow 80 MHz for VHT probe requests" considered disabled channels as VHT enabled, and mistakenly sent out probe-requests with the VHT IE. Signed-off-by: Arik Nemtsov --- net/mac80211/util.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 0f9bf47..ad8cb4f 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1470,10 +1470,12 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_local *local, /* Check if any channel in this sband supports at least 80 MHz */ for (i = 0; i < sband->n_channels; i++) { - if (!(sband->channels[i].flags & IEEE80211_CHAN_NO_80MHZ)) { - have_80mhz = true; - break; - } + if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | + IEEE80211_CHAN_NO_80MHZ)) + continue; + + have_80mhz = true; + break; } if (sband->vht_cap.vht_supported && have_80mhz) {