From patchwork Fri Jan 16 10:38:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 5647001 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 089F79F357 for ; Fri, 16 Jan 2015 10:39:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 19D3F2010F for ; Fri, 16 Jan 2015 10:39:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC793201C0 for ; Fri, 16 Jan 2015 10:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754241AbbAPKjp (ORCPT ); Fri, 16 Jan 2015 05:39:45 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:59070 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751952AbbAPKjl (ORCPT ); Fri, 16 Jan 2015 05:39:41 -0500 Received: by mail-wi0-f181.google.com with SMTP id hi2so2937070wib.2 for ; Fri, 16 Jan 2015 02:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Rgo2c87dyR3HriLW7SeUKSR3IEkmJcQI3RKEw02ZjCA=; b=4Op91/rYpT9XClGrGdkttbq3pEMlJduLQ9qhOT+ar9dWbozgR0u0Q241kKSK5fMDYu FDYGk08ONpGWtNdoKnQw1AyzAi7DPez0mX8qEhYh7+G+Acp5R/kri/cH9+SG5sedZ9nM YEdw/QAXEngMxLiFw9Bd++Xxszphlo6UVw91o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Rgo2c87dyR3HriLW7SeUKSR3IEkmJcQI3RKEw02ZjCA=; b=REmpUw7DNyKazxK0zjdDzHe93gRarJdfNNFF32tz/7Rtx84tWOj5KT705mYK2S5BvF lwTpwbmdCA71YyfGc3xyq++ptw5lGvCqTA822oXA5AQqPo2jvSJLWpHbWCjUy/1mPkTN A+PlcILuu1s3PXQ2uaFKQYtFyZovkP2EWTtSlCCmJgfRJ2Yv0Et3Z7g4Sq01ISUUbFV0 wDjREYEUjUG31OMV+6tBzTjoM1mAZG+n56nx1/X49/hlxO2X44wcEpy9OIvqZwgasMSq 8j7RQ7++uwjwE/3uVpqAsznhJjUR9VD6JPknESclHCXnDiJCk2HtuUeO9mUX1R1Ci6xa RjUw== X-Gm-Message-State: ALoCoQm/WxuCx1+ar4lt9hmkkBiQV5GVOBme5iK9D1Z/hOhgHO43QIRQRnFiDZNfyF0A8lK6RlExIUTj/fMQvXesqFCMGRKhjvN/McSwPbpw5+vnqV01n64HyvZJqS2PyU/Cn5kGrhxiKQwJyIyPmoyp6zNJd84jBYvEjCTa8mPqAZcr4eppLsXz+TA1Oviwz6CMsGNRV2cM X-Received: by 10.194.58.19 with SMTP id m19mr27764555wjq.52.1421404780631; Fri, 16 Jan 2015 02:39:40 -0800 (PST) Received: from localhost.localdomain (apn-46-76-65-212.dynamic.gprs.plus.pl. [46.76.65.212]) by mx.google.com with ESMTPSA id bo5sm148423wjc.39.2015.01.16.02.39.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Jan 2015 02:39:39 -0800 (PST) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Janusz Dziedzic Subject: [RFCv2 5/6] mac80211: ibss/mesh move bw checking Date: Fri, 16 Jan 2015 11:38:43 +0100 Message-Id: <1421404724-32326-5-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421404724-32326-1-git-send-email-janusz.dziedzic@tieto.com> References: <1421404724-32326-1-git-send-email-janusz.dziedzic@tieto.com> X-DomainID: tieto.com 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_SIGNED, 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 We will need this as a preparetion for VHT. Signed-off-by: Janusz Dziedzic --- net/mac80211/ht.c | 2 -- net/mac80211/ibss.c | 4 ++++ net/mac80211/mesh_plink.c | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index ff630be..7a76ce6 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c @@ -252,8 +252,6 @@ bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, break; } - if (bw != sta->sta.bandwidth) - changed = true; sta->sta.bandwidth = bw; sta->cur_max_bandwidth = diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index b1e9e9b..3c6df2b 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -1064,6 +1064,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, /* we both use HT */ struct ieee80211_ht_cap htcap_ie; struct cfg80211_chan_def chandef; + enum ieee80211_sta_rx_bandwidth bw = sta->sta.bandwidth; ieee80211_ht_oper_to_chandef(channel, elems->ht_operation, @@ -1082,6 +1083,9 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, rates_updated |= ieee80211_ht_cap_ie_to_sta_ht_cap( sdata, sband, &htcap_ie, sta); + + if (bw != sta->sta.bandwidth) + rates_updated |= true; } if (sta && rates_updated) { diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index fa94ca1..de5b8ac 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -382,6 +382,7 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata, enum ieee80211_band band = ieee80211_get_sdata_band(sdata); struct ieee80211_supported_band *sband; u32 rates, basic_rates = 0, changed = 0; + enum ieee80211_sta_rx_bandwidth bw = sta->sta.bandwidth; sband = local->hw.wiphy->bands[band]; rates = ieee80211_sta_get_rates(sdata, elems, band, &basic_rates); @@ -401,6 +402,9 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata, elems->ht_cap_elem, sta)) changed |= IEEE80211_RC_BW_CHANGED; + if (bw != sta->sta.bandwidth) + changed |= IEEE80211_RC_BW_CHANGED; + /* HT peer is operating 20MHz-only */ if (elems->ht_operation && !(elems->ht_operation->ht_param &