From patchwork Mon Sep 29 13:58:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karl Beldan X-Patchwork-Id: 4996421 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 76CF29F348 for ; Mon, 29 Sep 2014 13:58:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8208620220 for ; Mon, 29 Sep 2014 13:58:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7BCA620172 for ; Mon, 29 Sep 2014 13:58:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753300AbaI2N6w (ORCPT ); Mon, 29 Sep 2014 09:58:52 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:59434 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751913AbaI2N6v (ORCPT ); Mon, 29 Sep 2014 09:58:51 -0400 Received: by mail-wg0-f50.google.com with SMTP id l18so12584745wgh.9 for ; Mon, 29 Sep 2014 06:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=qFwIMtuJVuiGlUb9EHG9xxOOGnJvH9yHr1jYQUHKvKs=; b=oIRHnMwVbtHXk59bRfJdCXHDLzhWM2kqXTXR5SUefkixBZvNPZr7Lg/76lNnBwWT8Y PUwXNchcOlG6pHf0HbjkUmv5u42OmetalwDre3kSmMP3MvpjE7TBlCq8a9VS/foKy4Eb gW8RrH113SqI71bmnGj0kLiodKoORN+XNOow5Th6cC0kyGmgIuZBLKeVtRrkt2Y6KxfT eU9qgiwleiaz9q85LeSckFZdingWmjMYlOj1W2hiGm7m9OnO2nd/6KAhLqqaDZMG8/Uk iaRc+eWqsmrSZtATU0LoLgzG/AlzqGhGO5FVJUI8pNig7DetGojxq0UX/fFVejC3so6N 7oqg== X-Received: by 10.180.19.167 with SMTP id g7mr48279521wie.19.1411999130633; Mon, 29 Sep 2014 06:58:50 -0700 (PDT) Received: from magnum.frso.rivierawaves.com (vpn.rivierawaves.com. [91.151.119.162]) by mx.google.com with ESMTPSA id ul1sm15831759wjc.9.2014.09.29.06.58.49 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 29 Sep 2014 06:58:49 -0700 (PDT) Date: Mon, 29 Sep 2014 15:58:46 +0200 From: Karl Beldan To: Felix Fietkau Cc: Johannes Berg , linux-wireless , Karl Beldan Subject: Re: [PATCH] mac80211: minstrel_ht: add basic support for VHT rates <= 80MHz@NSS2 Message-ID: <20140929135805.GA28368@magnum.frso.rivierawaves.com> References: <1411951124-24490-1-git-send-email-karl.beldan@gmail.com> <54294687.1030307@openwrt.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <54294687.1030307@openwrt.org> X-Location: France-Nice User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 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 On Mon, Sep 29, 2014 at 01:46:15PM +0200, Felix Fietkau wrote: > On 2014-09-29 02:38, Karl Beldan wrote: > > diff --git a/net/mac80211/rc80211_minstrel_ht.h b/net/mac80211/rc80211_minstrel_ht.h > > index 01570e0..7856062 100644 > > --- a/net/mac80211/rc80211_minstrel_ht.h > > +++ b/net/mac80211/rc80211_minstrel_ht.h > > @@ -13,10 +13,33 @@ > > * The number of streams can be changed to 2 to reduce code > > * size and memory footprint. > > */ > > -#define MINSTREL_MAX_STREAMS 3 > > -#define MINSTREL_STREAM_GROUPS 4 > > +#ifdef CONFIG_MAC80211_RC_MINSTREL_VHT > > +#define MINSTREL_VHT_MAX_STREAMS 2 > > +#else > > +#define MINSTREL_VHT_MAX_STREAMS 0 > > +#endif > > +#define MINSTREL_VHT_STREAM_GROUPS 6 /* BW(=3) * SGI(=2) */ > > + > > +#define MINSTREL_HT_MAX_STREAMS 3 > > +#define MINSTREL_HT_STREAM_GROUPS 4 /* BW(=2) * SGI(=2) */ > I think we should get rid of MINSTREL_*_MAX_STREAMS instead of expanding > its use to VHT. > You mean having a common hardcoded value for both ? After 4441e8e9 the minstrel rate indexes have to be u8-s and having this common param > 2 would require something like: {{{ }}} With this I could not advertise the patch overhead-less when not setting MAC80211_RC_MINSTREL_VHT, too invasive for a simple step to feel the limits of the present implementation and a way to test vht tx path. But maybe that's not what you had in mind for MINSTREL_*_MAX_STREAMS ? Karl --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 41522c7..c3d9136 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -346,8 +364,8 @@ minstrel_ht_calc_tp(struct minstrel_ht_sta *mi, int group, int rate) * MCS groups, CCK rates do not provide aggregation and are therefore at last. */ static void -minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u8 index, - u8 *tp_list) +minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u16 index, + u16 *tp_list) { int cur_group, cur_idx, cur_thr, cur_prob; int tmp_group, tmp_idx, tmp_thr, tmp_prob; @@ -384,7 +402,7 @@ minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u8 index, * Find and set the topmost probability rate per sta and per group */ static void -minstrel_ht_set_best_prob_rate(struct minstrel_ht_sta *mi, u8 index) +minstrel_ht_set_best_prob_rate(struct minstrel_ht_sta *mi, u16 index) { struct minstrel_mcs_group_data *mg; struct minstrel_rate_stats *mr; @@ -427,8 +445,8 @@ minstrel_ht_set_best_prob_rate(struct minstrel_ht_sta *mi, u8 index) */ static void minstrel_ht_assign_best_tp_rates(struct minstrel_ht_sta *mi, - u8 tmp_mcs_tp_rate[MAX_THR_RATES], - u8 tmp_cck_tp_rate[MAX_THR_RATES]) + u16 tmp_mcs_tp_rate[MAX_THR_RATES], + u16 tmp_cck_tp_rate[MAX_THR_RATES]) { unsigned int tmp_group, tmp_idx, tmp_cck_tp, tmp_mcs_tp; int i; @@ -492,8 +510,8 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) struct minstrel_mcs_group_data *mg; struct minstrel_rate_stats *mr; int group, i, j; - u8 tmp_mcs_tp_rate[MAX_THR_RATES], tmp_group_tp_rate[MAX_THR_RATES]; - u8 tmp_cck_tp_rate[MAX_THR_RATES], index; + u16 tmp_mcs_tp_rate[MAX_THR_RATES], tmp_group_tp_rate[MAX_THR_RATES]; + u16 tmp_cck_tp_rate[MAX_THR_RATES], index; if (mi->ampdu_packets > 0) { mi->avg_ampdu_len = minstrel_ewma(mi->avg_ampdu_len, diff --git a/net/mac80211/rc80211_minstrel_ht.h b/net/mac80211/rc80211_minstrel_ht.h index 7856062..354e076 100644 --- a/net/mac80211/rc80211_minstrel_ht.h +++ b/net/mac80211/rc80211_minstrel_ht.h @@ -57,8 +57,8 @@ struct minstrel_mcs_group_data { u16 supported; /* sorted rate set within a MCS group*/ - u8 max_group_tp_rate[MAX_THR_RATES]; - u8 max_group_prob_rate; + u16 max_group_tp_rate[MAX_THR_RATES]; + u16 max_group_prob_rate; /* MCS rate statistics */ struct minstrel_rate_stats rates[MCS_GROUP_RATES]; @@ -75,8 +75,8 @@ struct minstrel_ht_sta { unsigned int avg_ampdu_len; /* overall sorted rate set */ - u8 max_tp_rate[MAX_THR_RATES]; - u8 max_prob_rate; + u16 max_tp_rate[MAX_THR_RATES]; + u16 max_prob_rate; /* time of last status update */ unsigned long stats_update;