linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] cfg80211: fix channel error on mesh join
@ 2012-12-01  2:30 Marco Porsch
  2012-12-03 10:24 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Porsch @ 2012-12-01  2:30 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, devel, Marco Porsch

Fix an error on mesh join when no channel has been explicitly set beforehand.

Previously a WARN_ON was hit in cfg80211_reg_can_beacon because center_freq1
was not set.

Also fix double semicolon.

Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de>
---
 net/wireless/mesh.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c
index f7b2da6..989b6ce 100644
--- a/net/wireless/mesh.c
+++ b/net/wireless/mesh.c
@@ -145,6 +145,7 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
 						   IEEE80211_CHAN_RADAR))
 					continue;
 				setup->chandef.chan = chan;
+				setup->chandef.center_freq1 = chan->center_freq;
 				break;
 			}
 
@@ -156,7 +157,7 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
 		if (!setup->chandef.chan)
 			return -EINVAL;
 
-		setup->chandef.width = NL80211_CHAN_WIDTH_20_NOHT;;
+		setup->chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
 	}
 
 	if (!cfg80211_reg_can_beacon(&rdev->wiphy, &setup->chandef))
-- 
1.7.9.5


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

* Re: [RFC] cfg80211: fix channel error on mesh join
  2012-12-01  2:30 [RFC] cfg80211: fix channel error on mesh join Marco Porsch
@ 2012-12-03 10:24 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2012-12-03 10:24 UTC (permalink / raw)
  To: Marco Porsch; +Cc: linux-wireless, devel

On Fri, 2012-11-30 at 18:30 -0800, Marco Porsch wrote:
> Fix an error on mesh join when no channel has been explicitly set beforehand.
> 
> Previously a WARN_ON was hit in cfg80211_reg_can_beacon because center_freq1
> was not set.
> 
> Also fix double semicolon.

Applied, but I moved the assignment down.

johannes


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

end of thread, other threads:[~2012-12-03 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-01  2:30 [RFC] cfg80211: fix channel error on mesh join Marco Porsch
2012-12-03 10:24 ` Johannes Berg

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).