Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ceffefd15aac78841432230627308b8a382dbcfc
Commit:     ceffefd15aac78841432230627308b8a382dbcfc
Parent:     db433febbadaf1fa9862fb5068b119be1d312d76
Author:     Michael Buesch <[EMAIL PROTECTED]>
AuthorDate: Sun Feb 10 14:16:52 2008 +0100
Committer:  John W. Linville <[EMAIL PROTECTED]>
CommitDate: Fri Feb 15 13:44:19 2008 -0500

    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: Michael Buesch <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 net/mac80211/ieee80211.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 67b7c75..28bcdf9 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -165,6 +165,7 @@ static int ieee80211_open(struct net_device *dev)
        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
        struct ieee80211_if_init_conf conf;
        int res;
+       bool need_hw_reconfig = 0;
 
        sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 
@@ -218,7 +219,7 @@ static int ieee80211_open(struct net_device *dev)
                        res = local->ops->start(local_to_hw(local));
                if (res)
                        return res;
-               ieee80211_hw_config(local);
+               need_hw_reconfig = 1;
                ieee80211_led_radio(local, local->hw.conf.radio_enabled);
        }
 
@@ -282,6 +283,8 @@ static int ieee80211_open(struct net_device *dev)
                atomic_inc(&local->iff_promiscs);
 
        local->open_count++;
+       if (need_hw_reconfig)
+               ieee80211_hw_config(local);
 
        netif_start_queue(dev);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to