From patchwork Sat Jul 25 14:32:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 6865091 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 24F57C05AC for ; Sat, 25 Jul 2015 14:32:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3CEA820628 for ; Sat, 25 Jul 2015 14:32:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5185020652 for ; Sat, 25 Jul 2015 14:32:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755043AbbGYOcg (ORCPT ); Sat, 25 Jul 2015 10:32:36 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:36592 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755029AbbGYOcf (ORCPT ); Sat, 25 Jul 2015 10:32:35 -0400 Received: by wicgb10 with SMTP id gb10so59609451wic.1 for ; Sat, 25 Jul 2015 07:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7elI6XJOaXMbLriiSR+JfnCWRksuXoixzaUqqA/uhU0=; b=jgCM/ZjeRQmloHSvBYjEuhIVfIbWHaDGhPa/S+e0SUgFNZzImEp9HLUOtHjonilUkV yUSpYHmwTTN6hRfpO4fuq4d8dBy1u2V7OGdhum/tQ+5JWCzGtklBfFp2T6/PlHgxdAGL vouova2AH4DPhAfvHS72RZXTIyYDhbwZOhxjX8eFt+KFI/TI8UuNpeKYaJKsJEYgBjNK +tiMS+cwVDr0+5295DWLzQGMVClX4rocPH/zD//fiXNN96wlKsaEX+wNSwfAdpFCVITw 4SaLNjvWo8lZ8PLaA8MrATfYNo5gSR+PdjWvGH7AxMCUx6Ei6OnNK0OORVd6KREQSxsg kNFw== X-Received: by 10.180.74.162 with SMTP id u2mr7225681wiv.0.1437834754004; Sat, 25 Jul 2015 07:32:34 -0700 (PDT) Received: from kxps.8.8.4.4 (ppp-133-20.30-151.libero.it. [151.30.20.133]) by smtp.gmail.com with ESMTPSA id lj2sm3545280wic.1.2015.07.25.07.32.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 25 Jul 2015 07:32:33 -0700 (PDT) From: Lorenzo Bianconi To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: [RFC 1/4] mac80211: remove ieee80211_tx_info from rate_control_apply_mask signature Date: Sat, 25 Jul 2015 16:32:26 +0200 Message-Id: <1437834749-23765-2-git-send-email-lorenzo.bianconi83@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437834749-23765-1-git-send-email-lorenzo.bianconi83@gmail.com> References: <1437834749-23765-1-git-send-email-lorenzo.bianconi83@gmail.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=-8.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Remove unnecessary ieee80211_tx_info pointer from rate_control_apply_mask signature. rate_control_apply_mask() will be used to define a ratemask in rate_control_set_rates() for station rate table Signed-off-by: Lorenzo Bianconi --- net/mac80211/rate.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 03687d2..4f02e07 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c @@ -631,7 +631,6 @@ static void rate_control_fill_sta_table(struct ieee80211_sta *sta, static void rate_control_apply_mask(struct ieee80211_sub_if_data *sdata, struct ieee80211_sta *sta, struct ieee80211_supported_band *sband, - struct ieee80211_tx_info *info, struct ieee80211_tx_rate *rates, int max_rates) { @@ -647,8 +646,8 @@ static void rate_control_apply_mask(struct ieee80211_sub_if_data *sdata, * default mask (allow all rates) is used to save some processing for * the common case. */ - mask = sdata->rc_rateidx_mask[info->band]; - has_mcs_mask = sdata->rc_has_mcs_mask[info->band]; + mask = sdata->rc_rateidx_mask[sband->band]; + has_mcs_mask = sdata->rc_has_mcs_mask[sband->band]; rate_flags = ieee80211_chandef_rate_flags(&sdata->vif.bss_conf.chandef); for (i = 0; i < sband->n_bitrates; i++) @@ -659,14 +658,14 @@ static void rate_control_apply_mask(struct ieee80211_sub_if_data *sdata, return; if (has_mcs_mask) - memcpy(mcs_mask, sdata->rc_rateidx_mcs_mask[info->band], + memcpy(mcs_mask, sdata->rc_rateidx_mcs_mask[sband->band], sizeof(mcs_mask)); else memset(mcs_mask, 0xff, sizeof(mcs_mask)); if (sta) { /* Filter out rates that the STA does not support */ - mask &= sta->supp_rates[info->band]; + mask &= sta->supp_rates[sband->band]; for (i = 0; i < sizeof(mcs_mask); i++) mcs_mask[i] &= sta->ht_cap.mcs.rx_mask[i]; } @@ -707,7 +706,7 @@ void ieee80211_get_tx_rates(struct ieee80211_vif *vif, sband = sdata->local->hw.wiphy->bands[info->band]; if (ieee80211_is_data(hdr->frame_control)) - rate_control_apply_mask(sdata, sta, sband, info, dest, max_rates); + rate_control_apply_mask(sdata, sta, sband, dest, max_rates); if (dest[0].idx < 0) __rate_control_send_low(&sdata->local->hw, sband, sta, info,