From patchwork Thu Aug 6 21:47:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 6963141 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 089B79F39D for ; Thu, 6 Aug 2015 21:47:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2F1482068E for ; Thu, 6 Aug 2015 21:47:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 472FF20658 for ; Thu, 6 Aug 2015 21:47:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755964AbbHFVrk (ORCPT ); Thu, 6 Aug 2015 17:47:40 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:33734 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754623AbbHFVri (ORCPT ); Thu, 6 Aug 2015 17:47:38 -0400 Received: by wijp15 with SMTP id p15so38588666wij.0 for ; Thu, 06 Aug 2015 14:47:37 -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=X78xa4Ip36AvlMyGg8rOTyZBvDnyK2Ooc/xoxRJ48mHYsgNmXbD0EPSF2XVN/XHop+ Nq6IxVCeXJUhJPcaA0+XVfIa5REB4OX37HsMAwyAPWAxCMIWrhtLSOk33uT43ro5u2M1 bFtRXCMT0gM0WsuflJH9/0xEPlrd5N0J3I06L42oP/C0Qkj9VjBgKmJ3yteuOZocgWX+ qTwQyMbe01JX28jmZPV3IDMJtofwApPfE0TRpeCbGFpIZzp9ppEYBHxhYuhKXXfH8T/3 O71+FNmBaYke4RUc6qFX8p/nylru99LmAChmhmQI4eHtmuX0It5oXmUUIb8lH9QlNHIt Sgng== X-Received: by 10.194.81.67 with SMTP id y3mr7318932wjx.7.1438897657606; Thu, 06 Aug 2015 14:47:37 -0700 (PDT) Received: from localhost.localdomain (host21-198-dynamic.25-79-r.retail.telecomitalia.it. [79.25.198.21]) by smtp.gmail.com with ESMTPSA id fa8sm5275844wib.14.2015.08.06.14.47.36 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Aug 2015 14:47:37 -0700 (PDT) From: Lorenzo Bianconi To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: [PATCH 1/4] mac80211: remove ieee80211_tx_info from rate_control_apply_mask signature Date: Thu, 6 Aug 2015 23:47:30 +0200 Message-Id: <1438897653-4629-2-git-send-email-lorenzo.bianconi83@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438897653-4629-1-git-send-email-lorenzo.bianconi83@gmail.com> References: <1438897653-4629-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=-6.9 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,