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 <[email protected]>
---
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
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