--- wireless.orig/drivers/net/wireless/b43/b43.h 2012-06-08 20:42:15.000000000 +0200 +++ wireless/drivers/net/wireless/b43/b43.h 2012-06-08 20:42:18.000000000 +0200 @@ -870,13 +870,6 @@ struct b43_wl { * handler, only. This basically is just the IRQ mask register. */ spinlock_t hardirq_lock; - /* The number of queues that were registered with the mac80211 subsystem - * initially. This is a backup copy of hw->queues in case hw->queues has - * to be dynamically lowered at runtime (Firmware does not support QoS). - * hw->queues has to be restored to the original value before unregistering - * from the mac80211 subsystem. */ - u16 mac80211_initially_registered_queues; - /* We can only have one operating interface (802.11 core) * at a time. General information about this interface follows. */ --- wireless.orig/drivers/net/wireless/b43/main.c 2012-06-08 20:42:15.000000000 +0200 +++ wireless/drivers/net/wireless/b43/main.c 2012-06-08 20:42:18.000000000 +0200 @@ -2538,9 +2538,6 @@ static int b43_upload_microcode(struct b dev->fw.hdr_format = B43_FW_HDR_351; dev->fw.opensource = (fwdate == 0xFFFF); - /* Default to use-all-queues. */ - dev->wl->hw->queues = dev->wl->mac80211_initially_registered_queues; - dev->qos_enabled = !!modparam_qos; /* Default to firmware/hardware crypto acceleration. */ dev->hwcrypto_enabled = true; @@ -2558,14 +2555,8 @@ static int b43_upload_microcode(struct b /* Disable hardware crypto and fall back to software crypto. */ dev->hwcrypto_enabled = false; } - if (!(fwcapa & B43_FWCAPA_QOS)) { - b43info(dev->wl, "QoS not supported by firmware\n"); - /* Disable QoS. Tweak hw->queues to 1. It will be restored before - * ieee80211_unregister to make sure the networking core can - * properly free possible resources. */ - dev->wl->hw->queues = 1; - dev->qos_enabled = false; - } + /* adding QoS support should use an offline discovery mechanism */ + WARN(fwcapa & B43_FWCAPA_QOS, "QoS in OpenFW not supported\n"); } else { b43info(dev->wl, "Loading firmware version %u.%u " "(20%.2i-%.2i-%.2i %.2i:%.2i:%.2i)\n", @@ -5272,6 +5263,7 @@ static void b43_wireless_exit(struct b43 static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev) { struct ssb_sprom *sprom = dev->bus_sprom; + struct b43_wldev *wldev = b43_bus_get_wldev(dev); struct ieee80211_hw *hw; struct b43_wl *wl; char chip_name[6]; @@ -5297,8 +5289,12 @@ static struct b43_wl *b43_wireless_init( hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; - hw->queues = modparam_qos ? B43_QOS_QUEUE_NUM : 1; - wl->mac80211_initially_registered_queues = hw->queues; + wldev->qos_enabled = true; + hw->queues = B43_QOS_QUEUE_NUM; + if (!modparam_qos || wldev->fw.opensource) { + hw->queues = 1; + wldev->qos_enabled = false; + } hw->max_rates = 2; SET_IEEE80211_DEV(hw, dev->dev); if (is_valid_ether_addr(sprom->et1mac)) @@ -5370,10 +5366,6 @@ static void b43_bcma_remove(struct bcma_ * as the ieee80211 unreg will destroy the workqueue. */ cancel_work_sync(&wldev->restart_work); - /* Restore the queues count before unregistering, because firmware detect - * might have modified it. Restoring is important, so the networking - * stack can properly free resources. */ - wl->hw->queues = wl->mac80211_initially_registered_queues; b43_leds_stop(wldev); ieee80211_unregister_hw(wl->hw); @@ -5447,10 +5439,6 @@ static void b43_ssb_remove(struct ssb_de B43_WARN_ON(!wl); if (wl->current_dev == wldev) { - /* Restore the queues count before unregistering, because firmware detect - * might have modified it. Restoring is important, so the networking - * stack can properly free resources. */ - wl->hw->queues = wl->mac80211_initially_registered_queues; b43_leds_stop(wldev); ieee80211_unregister_hw(wl->hw); }