From patchwork Wed Feb 8 14:32:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Koen Vandeputte X-Patchwork-Id: 9562657 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 48AD8601E5 for ; Wed, 8 Feb 2017 14:42:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3785E28173 for ; Wed, 8 Feb 2017 14:42:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BE49284FC; Wed, 8 Feb 2017 14:42:24 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 8B61428173 for ; Wed, 8 Feb 2017 14:42:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754530AbdBHOmD (ORCPT ); Wed, 8 Feb 2017 09:42:03 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:35049 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751932AbdBHOlu (ORCPT ); Wed, 8 Feb 2017 09:41:50 -0500 Received: by mail-wm0-f46.google.com with SMTP id v186so50092172wmd.0 for ; Wed, 08 Feb 2017 06:40:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zzOZhWlRZsRK++30nlJxjXxbQyuxwa5xxOLqg9rUp2U=; b=Cc9RbfQKs17BkwxWEZo/44gx1Pd6DYwjLvHwckcrQ8vOAfYf4jZk5Nbx803Je1NB7e mBhtT5p2V927wMVUQtwudiBX1ohpLUzQ18Cz4hPNvJ/NpVQ/s1rnpwt2ZWyeVgXc+S6T aAJEUvGF9mBKklTxhy53PYj51BSJ+CGS86rHo= 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:mime-version :content-transfer-encoding; bh=zzOZhWlRZsRK++30nlJxjXxbQyuxwa5xxOLqg9rUp2U=; b=El3GaZ1HVspI6DV1TxNJAInphup9bCEqFkN+kciA1WskL7Nd+7HBy6qU+YBqLB4HfW Q1HRJX66jLGJHveOwnALtKc4Ihd2du3WG0sOoQ42dBKqHl1u2mRsGni+FQnQaytvN17D ptfmH74l6RLQaUipa29BgewpBe7lenZaTUhn7MuKbkuNY8/Z9ea36rU4sdd9HnqnKDPw WAA+ETa3x2YxRANWCUj6KTCJ/B4PV9Ge8ku8JcO0gNNSpbmJs3FLAlJm3a/VcO8Z5qhh hNgYt+GYs6P4GFC3E8pke8qGbntij6SweGZU2dO29959F3bhJRPfPAz3CxW3/Bu7taMv n4HQ== X-Gm-Message-State: AMke39ntdM41qHzG4qxMFBHBZgRPeNTtSMPgzlon5CF+mYvTObUqh7tAgHbGefhBcVovsE8n X-Received: by 10.28.232.90 with SMTP id f87mr17071622wmh.35.1486564404956; Wed, 08 Feb 2017 06:33:24 -0800 (PST) Received: from localhost.localdomain (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.googlemail.com with ESMTPSA id v67sm13258816wrc.45.2017.02.08.06.33.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Feb 2017 06:33:24 -0800 (PST) From: Koen Vandeputte To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Koen Vandeputte , Piotr Gawlowicz , =?UTF-8?q?Miko=C5=82aj=20Chwalisz?= Subject: [PATCH] mac80211: fix CSA in IBSS mode Date: Wed, 8 Feb 2017 15:32:05 +0100 Message-Id: <1486564325-14251-1-git-send-email-koen.vandeputte@ncentric.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 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 Add the missing IBSS capability flag during capability init as it needs to be inserted into the generated beacon in order for CSA to work. Signed-off-by: Piotr Gawlowicz Signed-off-by: MikoĊ‚aj Chwalisz Tested-by: Koen Vandeputte --- 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 a31d307..98999d3 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -487,14 +487,14 @@ int ieee80211_ibss_csa_beacon(struct ieee80211_sub_if_data *sdata, struct beacon_data *presp, *old_presp; struct cfg80211_bss *cbss; const struct cfg80211_bss_ies *ies; - u16 capability = 0; + u16 capability = WLAN_CAPABILITY_IBSS; u64 tsf; int ret = 0; sdata_assert_lock(sdata); if (ifibss->privacy) - capability = WLAN_CAPABILITY_PRIVACY; + capability |= WLAN_CAPABILITY_PRIVACY; cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan, ifibss->bssid, ifibss->ssid,