source: branches/backfire/package/mac80211/patches/860-b43_restart_config.patch @ 27931

Last change on this file since 27931 was 27931, checked in by nbd, 5 years ago

b43: fix reloading config settings after channel changes or hostapd restart (#8033), backport of r27930

File size: 2.5 KB
  • drivers/net/wireless/b43/main.c

    a b static void b43_wireless_core_exit(struc 
    325325static int b43_wireless_core_init(struct b43_wldev *dev); 
    326326static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev); 
    327327static int b43_wireless_core_start(struct b43_wldev *dev); 
     328static void b43_op_bss_info_changed(struct ieee80211_hw *hw, 
     329                                    struct ieee80211_vif *vif, 
     330                                    struct ieee80211_bss_conf *conf, 
     331                                    u32 changed); 
    328332 
    329333static int b43_ratelimit(struct b43_wl *wl) 
    330334{ 
    static int b43_op_config(struct ieee8021 
    36023606        struct ieee80211_conf *conf = &hw->conf; 
    36033607        int antenna; 
    36043608        int err = 0; 
     3609        bool reload_bss = false; 
    36053610 
    36063611        mutex_lock(&wl->mutex); 
    36073612 
     3613        dev = wl->current_dev; 
     3614 
    36083615        /* Switch the band (if necessary). This might change the active core. */ 
    36093616        err = b43_switch_band(wl, conf->channel); 
    36103617        if (err) 
    36113618                goto out_unlock_mutex; 
    3612         dev = wl->current_dev; 
     3619 
     3620        /* Need to reload all settings if the core changed */ 
     3621        if (dev != wl->current_dev) { 
     3622                dev = wl->current_dev; 
     3623                changed = ~0; 
     3624                reload_bss = true; 
     3625        } 
     3626 
    36133627        phy = &dev->phy; 
    36143628 
    36153629        if (conf_is_ht(conf)) 
    out_mac_enable: 
    36703684out_unlock_mutex: 
    36713685        mutex_unlock(&wl->mutex); 
    36723686 
     3687        if (wl->vif && reload_bss) 
     3688                b43_op_bss_info_changed(hw, wl->vif, &wl->vif->bss_conf, ~0); 
     3689 
    36733690        return err; 
    36743691} 
    36753692 
    static void b43_op_bss_info_changed(stru 
    37583775        if (changed & BSS_CHANGED_BEACON_INT && 
    37593776            (b43_is_mode(wl, NL80211_IFTYPE_AP) || 
    37603777             b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT) || 
    3761              b43_is_mode(wl, NL80211_IFTYPE_ADHOC))) 
     3778             b43_is_mode(wl, NL80211_IFTYPE_ADHOC)) && 
     3779            conf->beacon_int) 
    37623780                b43_set_beacon_int(dev, conf->beacon_int); 
    37633781 
    37643782        if (changed & BSS_CHANGED_BASIC_RATES) 
    static int b43_op_start(struct ieee80211 
    45664584 out_mutex_unlock: 
    45674585        mutex_unlock(&wl->mutex); 
    45684586 
     4587        if (err == 0) 
     4588                b43_op_bss_info_changed(hw, vif, &vif->bss_conf, ~0); 
     4589 
     4590        /* reload configuration */ 
     4591        b43_op_config(hw, ~0); 
     4592 
    45694593        return err; 
    45704594} 
    45714595 
    out: 
    47224746        if (err) 
    47234747                wl->current_dev = NULL; /* Failed to init the dev. */ 
    47244748        mutex_unlock(&wl->mutex); 
    4725         if (err) 
     4749 
     4750        if (err) { 
    47264751                b43err(wl, "Controller restart FAILED\n"); 
    4727         else 
    4728                 b43info(wl, "Controller restarted\n"); 
     4752                return; 
     4753        } 
     4754 
     4755        /* reload configuration */ 
     4756        b43_op_config(wl->hw, ~0); 
     4757        if (wl->vif) 
     4758                b43_op_bss_info_changed(wl->hw, wl->vif, &wl->vif->bss_conf, ~0); 
     4759 
     4760        b43info(wl, "Controller restarted\n"); 
    47294761} 
    47304762 
    47314763static int b43_setup_bands(struct b43_wldev *dev, 
Note: See TracBrowser for help on using the repository browser.