From patchwork Tue Feb 14 13:22:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 9571953 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 8CF4260578 for ; Tue, 14 Feb 2017 13:22:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F24627C2D for ; Tue, 14 Feb 2017 13:22:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7400D28417; Tue, 14 Feb 2017 13:22:50 +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 0D1CA27C2D for ; Tue, 14 Feb 2017 13:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753843AbdBNNWg (ORCPT ); Tue, 14 Feb 2017 08:22:36 -0500 Received: from s3.sipsolutions.net ([5.9.151.49]:43624 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753838AbdBNNWP (ORCPT ); Tue, 14 Feb 2017 08:22:15 -0500 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.88) (envelope-from ) id 1cdd3d-0004HA-M5; Tue, 14 Feb 2017 14:22:13 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: j@w1.fi, greearb@candelatech.com, Johannes Berg Subject: [RFC v2 7/7] mac80211: copy VHT EXT NSS BW Support/Capable data to station Date: Tue, 14 Feb 2017 14:22:08 +0100 Message-Id: <20170214132208.8715-8-johannes@sipsolutions.net> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170214132208.8715-1-johannes@sipsolutions.net> References: <20170214132208.8715-1-johannes@sipsolutions.net> 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 From: Johannes Berg When taking VHT capabilities for a station, copy the new fields if we support them as a transmitted. Also, since it was missing, copy tx_highest and rx_highest. Signed-off-by: Johannes Berg --- net/mac80211/vht.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c index 19ec2189d3ac..c75d37f9bff0 100644 --- a/net/mac80211/vht.c +++ b/net/mac80211/vht.c @@ -197,6 +197,20 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, break; } + /* keep these, no need to limit to our own */ + vht_cap->vht_mcs.tx_highest = vht_cap_ie->supp_mcs.tx_highest; + vht_cap->vht_mcs.rx_highest = vht_cap_ie->supp_mcs.rx_highest; + + /* + * copy these only if rate control supports it, since otherwise some + * helper functions might return data that's not valid + */ + if (ieee80211_hw_check(&sdata->local->hw, SUPPORTS_VHT_EXT_NSS_BW)) + vht_cap->cap |= (cap_info & IEEE80211_VHT_CAP_EXT_NSS_BW_MASK); + else + vht_cap->vht_mcs.tx_highest &= + ~cpu_to_le16(IEEE80211_VHT_EXT_NSS_BW_CAPABLE); + /* symmetric capabilities */ vht_cap->cap |= cap_info & own_cap.cap & (IEEE80211_VHT_CAP_SHORT_GI_80 |