From patchwork Fri Sep 4 02:58:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Yeow Yeoh X-Patchwork-Id: 7119711 X-Patchwork-Delegate: johannes@sipsolutions.net 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2851CBEEC1 for ; Fri, 4 Sep 2015 02:58:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2BCD220895 for ; Fri, 4 Sep 2015 02:58:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3684120891 for ; Fri, 4 Sep 2015 02:58:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751823AbbIDC6c (ORCPT ); Thu, 3 Sep 2015 22:58:32 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:33928 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbbIDC6b (ORCPT ); Thu, 3 Sep 2015 22:58:31 -0400 Received: by padhy16 with SMTP id hy16so7232638pad.1 for ; Thu, 03 Sep 2015 19:58:31 -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; bh=9sCXlUN4dYCYwJIFxsjaOwCMc2UnVo6ZSw4YAAmYdxo=; b=chRPDVLRk0pfd9F5sBJUeyghcmX/rGg3JNw8LDmVgZq7Tk4U7aQPtPPZN/GgXdSuJL EaeEiYEF16sVsHx7awV4vYlK4Mdt9N+cNtxoZQ/PTJpQhUbBnZUZ5qXjVJVFF0jpVs6g Wd+trDtk/3GGhTWFpxlOBWWtUS9dA8ofwn/zHrlBmO4kLolrKoTo0sEGZtTKE29mMnRO Q3Qm+Ueb2/685AH3f6HRU4zpWwpOvUEwuODMBlOFYJjTASdKCTK/ZSCf0OeF9qtheF6n QcJJw4gEf/P+D+ckqp43/wO/JUe31B+ol9BIm7vO/GJ6I6L3UAoBKfC1cKANMYd6jcc7 1d3A== X-Received: by 10.66.66.40 with SMTP id c8mr2992888pat.70.1441335510901; Thu, 03 Sep 2015 19:58:30 -0700 (PDT) Received: from localhost.localdomain ([58.26.233.145]) by smtp.gmail.com with ESMTPSA id jv5sm557442pbc.47.2015.09.03.19.58.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Sep 2015 19:58:30 -0700 (PDT) From: Chun-Yeow Yeoh To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Chun-Yeow Yeoh Subject: [PATCH] mac80211: fix the setting of center freq segment 2 in VHT oper ie Date: Fri, 4 Sep 2015 10:58:05 +0800 Message-Id: <1441335485-5314-1-git-send-email-yeohchunyeow@gmail.com> X-Mailer: git-send-email 2.3.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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 This is to avoid the Channel Center Frequency Segment 2 in broadcasted VHT operation element contains the non-zero value for non 80+80 MHz that may failed the comparison of cfg80211_chandef_identical. This is tested with Bob's patches related to VHT mesh support. Signed-off-by: Chun-Yeow Yeoh --- net/mac80211/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 1104421..f167056 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -2324,6 +2324,8 @@ u8 *ieee80211_ie_build_vht_oper(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, if (chandef->center_freq2) vht_oper->center_freq_seg2_idx = ieee80211_frequency_to_channel(chandef->center_freq2); + else + vht_oper->center_freq_seg2_idx = 0x00; switch (chandef->width) { case NL80211_CHAN_WIDTH_160: