Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp78553yba; Mon, 20 May 2019 05:19:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6apGEgOLXqT2YNoqyKMTCThmqYzPHt6bVPjvef2/05gmMFoTVh3THwyW0uojc84GCAk53 X-Received: by 2002:a63:5659:: with SMTP id g25mr75905580pgm.59.1558354791513; Mon, 20 May 2019 05:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558354791; cv=none; d=google.com; s=arc-20160816; b=HqTx89mW1Ob+yMWt7oKxaTXncgG4yeC2sOB/9tQZyS7tB3LWHrhFwfd4lywTemT4cl wZ/eL4pTGIbEKO+MK/0qYLm/THpgBZ+tENVfb8oZlfqnx1vlt3heGS8vH4mJ9aY6sQZJ S7N7cfgj2yh3Z2xUxVDJ/p9ayaog/IqRZrD31/y+9DT12Z/+2jm8QNp2cTC77FuXYI7V uHei13rVDA5sTy4NZOICQx4jOZulvRUZB4OfqynA7n9Ge+42C7xqCjdIW57ORuIFJcpl UoWaWZJGEtrWNHC8ADxsYL4V7k1re+P5WlP5MT/uIgEAgOE/Z7BidvKTwvgdkB1Ax92r 9XPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=Tr1fjGTX5Ixa+Aa6FOvCr72Zm9MP9lrIgPeDAys8VBg=; b=fw+Sw5cjVZQHfikQwceHWv81fXNX6bdvRnh098QBw9f/UsNpCDod7dsEIJMqDpj1H8 r2KOKZ+77mu3kXPrxw3cZdCID9fveCap5xBnkOicnMrAZTHUg+ic/utk1sbu95F5B6x7 2Y51AUrX+57A/Za1KmAJei18fz1OZ5abV46+i0N2fZjgOZZMn/unUAxwKNX6sn/VIEYh uaYKPwyw4lrLQFyMOZKpFSTujQY27zwfJmwixfgKk62+f6aRhx+/oCHdgm+MLp/1KBZo Lis6KQQTc3FR3YmiFDqNU1fBttV3ihA1YDsJPYIpK+azG4dlny5NqWs81jSyXGk4KiBt xtbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=E7nU1gmm; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gn2si121672plb.34.2019.05.20.05.19.36; Mon, 20 May 2019 05:19:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=E7nU1gmm; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732404AbfETMA4 (ORCPT + 99 others); Mon, 20 May 2019 08:00:56 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:35366 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730479AbfETMAy (ORCPT ); Mon, 20 May 2019 08:00:54 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id DB25D30C074; Mon, 20 May 2019 05:00:52 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com DB25D30C074 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1558353652; bh=rTdnG2aRFOO0KC/KI61mstGyLoXkrAjLGr26vfgYNcg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E7nU1gmmEg8VA5I+2DUhzb6JniiaAEXlXZGo1jLIE1Ilasr95/3qhgD5eb+hGHTjM wm6DrYyB9OeSTeHDY+4HBJKMOJtnotcPA9Fx4x/hXd7oK1xI4Ik2bDMa4K802Y+owO PDR9LmTVrJM6bwm9DRy32dExPRdtoyPNQP7iXAck= Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 475AE60D69; Mon, 20 May 2019 05:00:53 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id EF0B6B02C43; Mon, 20 May 2019 14:00:50 +0200 (CEST) From: Arend van Spriel To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [RFC 7/8] cfg80211: ibss: use 11a mandatory rates for 6GHz band operation Date: Mon, 20 May 2019 14:00:44 +0200 Message-Id: <1558353645-18119-8-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1558353645-18119-1-git-send-email-arend.vanspriel@broadcom.com> References: <1558353645-18119-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The default mandatory rates, ie. when not specified by user-space, is determined by the band. Select 11a rateset for 6GHz band. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Leon Zegers Signed-off-by: Arend van Spriel --- net/wireless/ibss.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index d1743e6..ae8fe66 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c @@ -104,13 +104,19 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, * use the mandatory rate set for 11b or * 11a for maximum compatibility. */ - struct ieee80211_supported_band *sband = - rdev->wiphy.bands[params->chandef.chan->band]; + struct ieee80211_supported_band *sband; + enum nl80211_band band; + u32 flag; int j; - u32 flag = params->chandef.chan->band == NL80211_BAND_5GHZ ? - IEEE80211_RATE_MANDATORY_A : - IEEE80211_RATE_MANDATORY_B; + band = params->chandef.chan->band; + if (band == NL80211_BAND_5GHZ || + band == NL80211_BAND_6GHZ) + flag = IEEE80211_RATE_MANDATORY_A; + else + flag = IEEE80211_RATE_MANDATORY_B; + + sband = rdev->wiphy.bands[band]; for (j = 0; j < sband->n_bitrates; j++) { if (sband->bitrates[j].flags & flag) params->basic_rates |= BIT(j); -- 1.9.1