linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Call driver commands after drv_start in mac80211 restart code
@ 2011-12-20  6:05 Yogesh Ashok Powar
  2011-12-21 13:28 ` Stanislaw Gruszka
  0 siblings, 1 reply; 3+ messages in thread
From: Yogesh Ashok Powar @ 2011-12-20  6:05 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Nishant Sarmukadam

Ideally, hardware/firmware initialization is complete after the
drv_start routine. In mac80211 restart code (ieee80211_reconfig),
defer calling the driver commands i.e. setup fragmentation
threshold, rts threshold and coverage class till drv_start
routine is called.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
---
 net/mac80211/util.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index eb1a5f7..faa0ad3 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1142,16 +1142,6 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 		 */
 	}
 #endif
-
-	/* setup fragmentation threshold */
-	drv_set_frag_threshold(local, hw->wiphy->frag_threshold);
-
-	/* setup RTS threshold */
-	drv_set_rts_threshold(local, hw->wiphy->rts_threshold);
-
-	/* reset coverage class */
-	drv_set_coverage_class(local, hw->wiphy->coverage_class);
-
 	/* everything else happens only if HW was up & running */
 	if (!local->open_count)
 		goto wake_up;
@@ -1170,6 +1160,16 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 		return res;
 	}
 
+	/* setup fragmentation threshold */
+	drv_set_frag_threshold(local, hw->wiphy->frag_threshold);
+
+	/* setup RTS threshold */
+	drv_set_rts_threshold(local, hw->wiphy->rts_threshold);
+
+	/* reset coverage class */
+	drv_set_coverage_class(local, hw->wiphy->coverage_class);
+
+
 	ieee80211_led_radio(local, true);
 	ieee80211_mod_tpt_led_trig(local,
 				   IEEE80211_TPT_LEDTRIG_FL_RADIO, 0);
-- 
1.7.5.4


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

* Re: [PATCH] mac80211: Call driver commands after drv_start in mac80211 restart code
  2011-12-20  6:05 [PATCH] mac80211: Call driver commands after drv_start in mac80211 restart code Yogesh Ashok Powar
@ 2011-12-21 13:28 ` Stanislaw Gruszka
  2011-12-22  6:08   ` Yogesh Ashok Powar
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislaw Gruszka @ 2011-12-21 13:28 UTC (permalink / raw)
  To: Yogesh Ashok Powar; +Cc: John W. Linville, linux-wireless, Nishant Sarmukadam

On Tue, Dec 20, 2011 at 11:35:16AM +0530, Yogesh Ashok Powar wrote:
> Ideally, hardware/firmware initialization is complete after the
> drv_start routine. In mac80211 restart code (ieee80211_reconfig),
> defer calling the driver commands i.e. setup fragmentation
> threshold, rts threshold and coverage class till drv_start
> routine is called.

I think this could break drivers that could relay on order we
have at present. Also chenglog does not tell much. What for you
need that change?

> +	/* reset coverage class */
> +	drv_set_coverage_class(local, hw->wiphy->coverage_class);
> +
> +
One extra empty line.

Stanislaw

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

* Re: [PATCH] mac80211: Call driver commands after drv_start in mac80211 restart code
  2011-12-21 13:28 ` Stanislaw Gruszka
@ 2011-12-22  6:08   ` Yogesh Ashok Powar
  0 siblings, 0 replies; 3+ messages in thread
From: Yogesh Ashok Powar @ 2011-12-22  6:08 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: John W. Linville, linux-wireless, Nishant Sarmukadam

On Wed, Dec 21, 2011 at 05:28:11AM -0800, Stanislaw Gruszka wrote:
> On Tue, Dec 20, 2011 at 11:35:16AM +0530, Yogesh Ashok Powar wrote:
> > Ideally, hardware/firmware initialization is complete after the
> > drv_start routine. In mac80211 restart code (ieee80211_reconfig),
> > defer calling the driver commands i.e. setup fragmentation
> > threshold, rts threshold and coverage class till drv_start
> > routine is called.
> 
> I think this could break drivers that could relay on order we
> have at present. Also chenglog does not tell much. What for you
> need that change?
Is there any specific example? Currently, when the AP is initialized
by the hostapd, drv_start is called first and then the mentioned
commands. We should follow the same sequence even during reconfig. The
reason we need these commands to be sent after drv_start is mentioned in
the commit log i.e. our hw/firmware initialization gets completed in
drv_start. Hence we expect these commands only after drv_start.

Thanks
Yogesh

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

end of thread, other threads:[~2011-12-22  6:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20  6:05 [PATCH] mac80211: Call driver commands after drv_start in mac80211 restart code Yogesh Ashok Powar
2011-12-21 13:28 ` Stanislaw Gruszka
2011-12-22  6:08   ` Yogesh Ashok Powar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).