提交 ceffefd1 编写于 作者: M Michael Buesch 提交者: John W. Linville

mac80211: Fix initial hardware configuration

On the initial device-open we need to defer the hardware reconfiguration
after we incremented the open_count, because the hw_config checks this flag
and won't call the lowlevel driver in case it is zero.
Signed-off-by: NMichael Buesch <mb@bu3sch.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 db433feb
...@@ -165,6 +165,7 @@ static int ieee80211_open(struct net_device *dev) ...@@ -165,6 +165,7 @@ static int ieee80211_open(struct net_device *dev)
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_if_init_conf conf; struct ieee80211_if_init_conf conf;
int res; int res;
bool need_hw_reconfig = 0;
sdata = IEEE80211_DEV_TO_SUB_IF(dev); sdata = IEEE80211_DEV_TO_SUB_IF(dev);
...@@ -218,7 +219,7 @@ static int ieee80211_open(struct net_device *dev) ...@@ -218,7 +219,7 @@ static int ieee80211_open(struct net_device *dev)
res = local->ops->start(local_to_hw(local)); res = local->ops->start(local_to_hw(local));
if (res) if (res)
return res; return res;
ieee80211_hw_config(local); need_hw_reconfig = 1;
ieee80211_led_radio(local, local->hw.conf.radio_enabled); ieee80211_led_radio(local, local->hw.conf.radio_enabled);
} }
...@@ -282,6 +283,8 @@ static int ieee80211_open(struct net_device *dev) ...@@ -282,6 +283,8 @@ static int ieee80211_open(struct net_device *dev)
atomic_inc(&local->iff_promiscs); atomic_inc(&local->iff_promiscs);
local->open_count++; local->open_count++;
if (need_hw_reconfig)
ieee80211_hw_config(local);
netif_start_queue(dev); netif_start_queue(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册