Search Linux Wireless

[RFC] cfg80211: fix channel error on mesh join

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux