From patchwork Mon Apr 17 20:59:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 9684547 X-Patchwork-Delegate: johannes@sipsolutions.net 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 C66FD60326 for ; Mon, 17 Apr 2017 21:01:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACF5328210 for ; Mon, 17 Apr 2017 21:01:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FD4D28342; Mon, 17 Apr 2017 21:01:03 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 20A7728210 for ; Mon, 17 Apr 2017 21:01:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754725AbdDQVAn (ORCPT ); Mon, 17 Apr 2017 17:00:43 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:36862 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754035AbdDQVAk (ORCPT ); Mon, 17 Apr 2017 17:00:40 -0400 Received: by mail-pf0-f176.google.com with SMTP id 194so31464954pfv.3 for ; Mon, 17 Apr 2017 14:00:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jqqlhp1klHVLxSMFFOiQ6XhtBcgu6kqS4Lp3nMHJssY=; b=Fiaf/V8TH0knkCbdx0sE8vZNcsZ4I0BXQgKlXxHOgozzrqxqatwmSOj2oVKA0IhnHj M/4cnLOe3idgwDuT87gcMYtkV/YJbiVD6eUnmuYd8WJAo7g1nOiyOy6KOrjW/Dbhms2U H/10ZAzXIt3qcnfFgoxt/yicAwU1EH/4/Qp5P5uPFpb9qfyVL4d6Yhvujnm/Oy7FqWed oqWsHACujyfJk/TZZMGGPxibFrelHg/aSAqtXEYhrJTfPBk+Y5nJjCf5kA5eemtrA2Qt kEo/7ZdBY6idi1H7JYk5eHIVwbZjyPYye6HG88Jt5LC/GP48WiDdLHC/9WdXdNa9NMnG QNZQ== X-Gm-Message-State: AN3rC/7bSNF5ghHdhKEYfdJOR70rHSlVKGdi+nbIJvV7RxfxZikvK+SA 3dB5mvnMKpMB3TecpwfgnA== X-Received: by 10.98.88.130 with SMTP id m124mr14001656pfb.76.1492462839587; Mon, 17 Apr 2017 14:00:39 -0700 (PDT) Received: from mka.mtv.corp.google.com ([172.22.64.162]) by smtp.gmail.com with ESMTPSA id 133sm19738063pfy.106.2017.04.17.14.00.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Apr 2017 14:00:38 -0700 (PDT) From: Matthias Kaehlcke To: Johannes Berg , "David S . Miller" , Simon Wunderlich Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Grundler , Greg Hackmann , Michael Davidson , Matthias Kaehlcke Subject: [PATCH] mac80211: ibss: Fix channel type enum in ieee80211_sta_join_ibss() Date: Mon, 17 Apr 2017 13:59:53 -0700 Message-Id: <20170417205953.4719-1-mka@chromium.org> X-Mailer: git-send-email 2.12.2.762.g0e3151a226-goog 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 cfg80211_chandef_create() expects an 'enum nl80211_channel_type' as channel type however in ieee80211_sta_join_ibss() NL80211_CHAN_WIDTH_20_NOHT is passed in two occasions, which is of the enum type 'nl80211_chan_width'. Change the value to NL80211_CHAN_NO_HT (20 MHz, non-HT channel) of the channel type enum. Signed-off-by: Matthias Kaehlcke --- net/mac80211/ibss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 98999d3d5262..e957351976a2 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -425,7 +425,7 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, case NL80211_CHAN_WIDTH_5: case NL80211_CHAN_WIDTH_10: cfg80211_chandef_create(&chandef, cbss->channel, - NL80211_CHAN_WIDTH_20_NOHT); + NL80211_CHAN_NO_HT); chandef.width = sdata->u.ibss.chandef.width; break; case NL80211_CHAN_WIDTH_80: @@ -437,7 +437,7 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, default: /* fall back to 20 MHz for unsupported modes */ cfg80211_chandef_create(&chandef, cbss->channel, - NL80211_CHAN_WIDTH_20_NOHT); + NL80211_CHAN_NO_HT); break; }