All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] mac80211: fix minstrel fixed_rate management
@ 2013-08-27 14:59 Lorenzo Bianconi
  2013-08-27 14:59 ` [PATCH 1/2] mac80211: add fixed_rate management to minstrel rc Lorenzo Bianconi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lorenzo Bianconi @ 2013-08-27 14:59 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, nbd, johannes

This couple of patches add/fix fixed_rate management of minstrel/minstrel_ht
rate controller. In particular:
*[PATCH 1/2]: add the capability to use a particular rate to minstrel rate
 controller
*[PATCH 2/2]: restore the mcs index configured according to fixed_rate value
 since it has been overridden in minstrel_ht_update_stats throughput computation

Regards,
Lorenzo

Lorenzo Bianconi (2):
  mac80211: add fixed_rate management to minstrel rc
  mac80211: do not override fixed_rate_idx in minstrel_ht_update_stats

 net/mac80211/rc80211_minstrel.c    | 14 ++++++++++++++
 net/mac80211/rc80211_minstrel_ht.c | 23 +++++++++++++----------
 2 files changed, 27 insertions(+), 10 deletions(-)

-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] mac80211: add fixed_rate management to minstrel rc
  2013-08-27 14:59 [PATCH 0/2] mac80211: fix minstrel fixed_rate management Lorenzo Bianconi
@ 2013-08-27 14:59 ` Lorenzo Bianconi
  2013-08-27 14:59 ` [PATCH 2/2] mac80211: do not override fixed_rate_idx in minstrel_ht_update_stats Lorenzo Bianconi
  2013-08-30 11:06 ` [PATCH 0/2] mac80211: fix minstrel fixed_rate management Felix Fietkau
  2 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Bianconi @ 2013-08-27 14:59 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, nbd, johannes

Add the capability to use a fixed modulation rate to minstrel rate controller

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
---
 net/mac80211/rc80211_minstrel.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 8b5f7ef..7fa1b36 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -203,6 +203,15 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
 	memcpy(mi->max_tp_rate, tmp_tp_rate, sizeof(mi->max_tp_rate));
 	mi->max_prob_rate = tmp_prob_rate;
 
+#ifdef CONFIG_MAC80211_DEBUGFS
+	/* use fixed index if set */
+	if (mp->fixed_rate_idx != -1) {
+		mi->max_tp_rate[0] = mp->fixed_rate_idx;
+		mi->max_tp_rate[1] = mp->fixed_rate_idx;
+		mi->max_prob_rate = mp->fixed_rate_idx;
+	}
+#endif
+
 	/* Reset update timer */
 	mi->stats_update = jiffies;
 
@@ -310,6 +319,11 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
 	/* increase sum packet counter */
 	mi->packet_count++;
 
+#ifdef CONFIG_MAC80211_DEBUGFS
+	if (mp->fixed_rate_idx != -1)
+		return;
+#endif
+
 	delta = (mi->packet_count * sampling_ratio / 100) -
 			(mi->sample_count + mi->sample_deferred / 2);
 
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] mac80211: do not override fixed_rate_idx in minstrel_ht_update_stats
  2013-08-27 14:59 [PATCH 0/2] mac80211: fix minstrel fixed_rate management Lorenzo Bianconi
  2013-08-27 14:59 ` [PATCH 1/2] mac80211: add fixed_rate management to minstrel rc Lorenzo Bianconi
@ 2013-08-27 14:59 ` Lorenzo Bianconi
  2013-08-30 11:06 ` [PATCH 0/2] mac80211: fix minstrel fixed_rate management Felix Fietkau
  2 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Bianconi @ 2013-08-27 14:59 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, nbd, johannes

Do not override max_tp_rate, max_tp_rate2 and max_prob_rate configured
according to fixed_rate in minstrel_ht_update_stats throughput computation

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
---
 net/mac80211/rc80211_minstrel_ht.c | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 339a6b8..597e09a 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -365,6 +365,14 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
 		}
 	}
 
+#ifdef CONFIG_MAC80211_DEBUGFS
+	/* use fixed index if set */
+	if (mp->fixed_rate_idx != -1) {
+		mi->max_tp_rate = mp->fixed_rate_idx;
+		mi->max_tp_rate2 = mp->fixed_rate_idx;
+		mi->max_prob_rate = mp->fixed_rate_idx;
+	}
+#endif
 
 	mi->stats_update = jiffies;
 }
@@ -775,6 +783,11 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
 	info->flags |= mi->tx_flags;
 	minstrel_ht_check_cck_shortpreamble(mp, mi, txrc->short_preamble);
 
+#ifdef CONFIG_MAC80211_DEBUGFS
+	if (mp->fixed_rate_idx != -1)
+		return;
+#endif
+
 	/* Don't use EAPOL frames for sampling on non-mrr hw */
 	if (mp->hw->max_rates == 1 &&
 	    (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO))
@@ -782,16 +795,6 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
 	else
 		sample_idx = minstrel_get_sample_rate(mp, mi);
 
-#ifdef CONFIG_MAC80211_DEBUGFS
-	/* use fixed index if set */
-	if (mp->fixed_rate_idx != -1) {
-		mi->max_tp_rate = mp->fixed_rate_idx;
-		mi->max_tp_rate2 = mp->fixed_rate_idx;
-		mi->max_prob_rate = mp->fixed_rate_idx;
-		sample_idx = -1;
-	}
-#endif
-
 	mi->total_packets++;
 
 	/* wraparound */
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] mac80211: fix minstrel fixed_rate management
  2013-08-27 14:59 [PATCH 0/2] mac80211: fix minstrel fixed_rate management Lorenzo Bianconi
  2013-08-27 14:59 ` [PATCH 1/2] mac80211: add fixed_rate management to minstrel rc Lorenzo Bianconi
  2013-08-27 14:59 ` [PATCH 2/2] mac80211: do not override fixed_rate_idx in minstrel_ht_update_stats Lorenzo Bianconi
@ 2013-08-30 11:06 ` Felix Fietkau
  2013-08-30 11:29   ` Johannes Berg
  2 siblings, 1 reply; 5+ messages in thread
From: Felix Fietkau @ 2013-08-30 11:06 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: linville, linux-wireless, johannes

On 2013-08-27 4:59 PM, Lorenzo Bianconi wrote:
> This couple of patches add/fix fixed_rate management of minstrel/minstrel_ht
> rate controller. In particular:
> *[PATCH 1/2]: add the capability to use a particular rate to minstrel rate
>  controller
> *[PATCH 2/2]: restore the mcs index configured according to fixed_rate value
>  since it has been overridden in minstrel_ht_update_stats throughput computation
> 
> Regards,
> Lorenzo
> 
> Lorenzo Bianconi (2):
>   mac80211: add fixed_rate management to minstrel rc
>   mac80211: do not override fixed_rate_idx in minstrel_ht_update_stats
> 
>  net/mac80211/rc80211_minstrel.c    | 14 ++++++++++++++
>  net/mac80211/rc80211_minstrel_ht.c | 23 +++++++++++++----------
>  2 files changed, 27 insertions(+), 10 deletions(-)
Acked-by: Felix Fietkau <nbd@openwrt.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] mac80211: fix minstrel fixed_rate management
  2013-08-30 11:06 ` [PATCH 0/2] mac80211: fix minstrel fixed_rate management Felix Fietkau
@ 2013-08-30 11:29   ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2013-08-30 11:29 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: Lorenzo Bianconi, linville, linux-wireless

On Fri, 2013-08-30 at 13:06 +0200, Felix Fietkau wrote:
> On 2013-08-27 4:59 PM, Lorenzo Bianconi wrote:
> > This couple of patches add/fix fixed_rate management of minstrel/minstrel_ht
> > rate controller. In particular:
> > *[PATCH 1/2]: add the capability to use a particular rate to minstrel rate
> >  controller
> > *[PATCH 2/2]: restore the mcs index configured according to fixed_rate value
> >  since it has been overridden in minstrel_ht_update_stats throughput computation
> > 
> > Regards,
> > Lorenzo
> > 
> > Lorenzo Bianconi (2):
> >   mac80211: add fixed_rate management to minstrel rc
> >   mac80211: do not override fixed_rate_idx in minstrel_ht_update_stats
> > 
> >  net/mac80211/rc80211_minstrel.c    | 14 ++++++++++++++
> >  net/mac80211/rc80211_minstrel_ht.c | 23 +++++++++++++----------
> >  2 files changed, 27 insertions(+), 10 deletions(-)
> Acked-by: Felix Fietkau <nbd@openwrt.org>

Applied.

johannes


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-30 11:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 14:59 [PATCH 0/2] mac80211: fix minstrel fixed_rate management Lorenzo Bianconi
2013-08-27 14:59 ` [PATCH 1/2] mac80211: add fixed_rate management to minstrel rc Lorenzo Bianconi
2013-08-27 14:59 ` [PATCH 2/2] mac80211: do not override fixed_rate_idx in minstrel_ht_update_stats Lorenzo Bianconi
2013-08-30 11:06 ` [PATCH 0/2] mac80211: fix minstrel fixed_rate management Felix Fietkau
2013-08-30 11:29   ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.