Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes

+76 -24
+6
MAINTAINERS
··· 2489 2489 W: ftp://ftp.kernel.org/pub/linux/docs/manpages 2490 2490 S: Maintained 2491 2491 2492 + MARVELL LIBERTAS WIRELESS DRIVER 2493 + P: Dan Williams 2494 + M: dcbw@redhat.com 2495 + L: libertas-dev@lists.infradead.org 2496 + S: Maintained 2497 + 2492 2498 MARVELL MV643XX ETHERNET DRIVER 2493 2499 P: Dale Farnsworth 2494 2500 M: dale@farnsworth.org
+1
drivers/net/wireless/Kconfig
··· 264 264 config LIBERTAS 265 265 tristate "Marvell 8xxx Libertas WLAN driver support" 266 266 depends on WLAN_80211 267 + select WIRELESS_EXT 267 268 select IEEE80211 268 269 select FW_LOADER 269 270 ---help---
+4
drivers/net/wireless/b43/leds.c
··· 163 163 b43_register_led(dev, &dev->led_radio, name, 164 164 b43_rfkill_led_name(dev), 165 165 led_index, activelow); 166 + /* Sync the RF-kill LED state with the switch state. */ 167 + if (dev->radio_hw_enable) 168 + b43_led_turn_on(dev, led_index, activelow); 166 169 break; 167 170 case B43_LED_WEIRD: 168 171 case B43_LED_ASSOC: ··· 235 232 b43_unregister_led(&dev->led_tx); 236 233 b43_unregister_led(&dev->led_rx); 237 234 b43_unregister_led(&dev->led_assoc); 235 + b43_unregister_led(&dev->led_radio); 238 236 }
+11 -11
drivers/net/wireless/b43/main.c
··· 2163 2163 static void b43_chip_exit(struct b43_wldev *dev) 2164 2164 { 2165 2165 b43_radio_turn_off(dev, 1); 2166 - b43_leds_exit(dev); 2167 2166 b43_gpio_cleanup(dev); 2168 2167 /* firmware is released later */ 2169 2168 } ··· 2190 2191 err = b43_gpio_init(dev); 2191 2192 if (err) 2192 2193 goto out; /* firmware is released later */ 2193 - b43_leds_init(dev); 2194 2194 2195 2195 err = b43_upload_initvals(dev); 2196 2196 if (err) 2197 - goto err_leds_exit; 2197 + goto err_gpio_clean; 2198 2198 b43_radio_turn_on(dev); 2199 2199 2200 2200 b43_write16(dev, 0x03E6, 0x0000); ··· 2269 2271 2270 2272 err_radio_off: 2271 2273 b43_radio_turn_off(dev, 1); 2272 - err_leds_exit: 2273 - b43_leds_exit(dev); 2274 + err_gpio_clean: 2274 2275 b43_gpio_cleanup(dev); 2275 2276 return err; 2276 2277 } ··· 3270 3273 return; 3271 3274 b43_set_status(dev, B43_STAT_UNINIT); 3272 3275 3273 - mutex_unlock(&dev->wl->mutex); 3274 - b43_rfkill_exit(dev); 3275 - mutex_lock(&dev->wl->mutex); 3276 - 3276 + b43_leds_exit(dev); 3277 3277 b43_rng_exit(dev->wl); 3278 3278 b43_pio_free(dev); 3279 3279 b43_dma_free(dev); ··· 3399 3405 memset(wl->mac_addr, 0, ETH_ALEN); 3400 3406 b43_upload_card_macaddress(dev); 3401 3407 b43_security_init(dev); 3402 - b43_rfkill_init(dev); 3403 3408 b43_rng_init(wl); 3404 3409 3405 3410 b43_set_status(dev, B43_STAT_INITIALIZED); 3406 3411 3407 - out: 3412 + b43_leds_init(dev); 3413 + out: 3408 3414 return err; 3409 3415 3410 3416 err_chip_exit: ··· 3493 3499 int did_init = 0; 3494 3500 int err = 0; 3495 3501 3502 + /* First register RFkill. 3503 + * LEDs that are registered later depend on it. */ 3504 + b43_rfkill_init(dev); 3505 + 3496 3506 mutex_lock(&wl->mutex); 3497 3507 3498 3508 if (b43_status(dev) < B43_STAT_INITIALIZED) { ··· 3525 3527 { 3526 3528 struct b43_wl *wl = hw_to_b43_wl(hw); 3527 3529 struct b43_wldev *dev = wl->current_dev; 3530 + 3531 + b43_rfkill_exit(dev); 3528 3532 3529 3533 mutex_lock(&wl->mutex); 3530 3534 if (b43_status(dev) >= B43_STAT_STARTED)
+32 -5
drivers/net/wireless/b43/rfkill.c
··· 25 25 #include "rfkill.h" 26 26 #include "b43.h" 27 27 28 + #include <linux/kmod.h> 29 + 28 30 29 31 /* Returns TRUE, if the radio is enabled in hardware. */ 30 32 static bool b43_is_hw_radio_enabled(struct b43_wldev *dev) ··· 52 50 bool report_change = 0; 53 51 54 52 mutex_lock(&wl->mutex); 55 - B43_WARN_ON(b43_status(dev) < B43_STAT_INITIALIZED); 53 + if (unlikely(b43_status(dev) < B43_STAT_INITIALIZED)) { 54 + mutex_unlock(&wl->mutex); 55 + return; 56 + } 56 57 enabled = b43_is_hw_radio_enabled(dev); 57 58 if (unlikely(enabled != dev->radio_hw_enable)) { 58 59 dev->radio_hw_enable = enabled; ··· 65 60 } 66 61 mutex_unlock(&wl->mutex); 67 62 68 - if (unlikely(report_change)) 69 - input_report_key(poll_dev->input, KEY_WLAN, enabled); 63 + /* send the radio switch event to the system - note both a key press 64 + * and a release are required */ 65 + if (unlikely(report_change)) { 66 + input_report_key(poll_dev->input, KEY_WLAN, 1); 67 + input_report_key(poll_dev->input, KEY_WLAN, 0); 68 + } 70 69 } 71 70 72 71 /* Called when the RFKILL toggled in software. */ ··· 78 69 { 79 70 struct b43_wldev *dev = data; 80 71 struct b43_wl *wl = dev->wl; 81 - int err = 0; 72 + int err = -EBUSY; 82 73 83 74 if (!wl->rfkill.registered) 84 75 return 0; 85 76 86 77 mutex_lock(&wl->mutex); 87 - B43_WARN_ON(b43_status(dev) < B43_STAT_INITIALIZED); 78 + if (b43_status(dev) < B43_STAT_INITIALIZED) 79 + goto out_unlock; 80 + err = 0; 88 81 switch (state) { 89 82 case RFKILL_STATE_ON: 90 83 if (!dev->radio_hw_enable) { ··· 144 133 rfk->poll_dev->poll = b43_rfkill_poll; 145 134 rfk->poll_dev->poll_interval = 1000; /* msecs */ 146 135 136 + rfk->poll_dev->input->name = rfk->name; 137 + rfk->poll_dev->input->id.bustype = BUS_HOST; 138 + rfk->poll_dev->input->id.vendor = dev->dev->bus->boardinfo.vendor; 139 + rfk->poll_dev->input->evbit[0] = BIT(EV_KEY); 140 + set_bit(KEY_WLAN, rfk->poll_dev->input->keybit); 141 + 147 142 err = rfkill_register(rfk->rfkill); 148 143 if (err) 149 144 goto err_free_polldev; 145 + 146 + #ifdef CONFIG_RFKILL_INPUT_MODULE 147 + /* B43 RF-kill isn't useful without the rfkill-input subsystem. 148 + * Try to load the module. */ 149 + err = request_module("rfkill-input"); 150 + if (err) 151 + b43warn(wl, "Failed to load the rfkill-input module. " 152 + "The built-in radio LED will not work.\n"); 153 + #endif /* CONFIG_RFKILL_INPUT */ 154 + 150 155 err = input_register_polled_device(rfk->poll_dev); 151 156 if (err) 152 157 goto err_unreg_rfk;
+1 -1
drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c
··· 219 219 ssize_t buf_size; 220 220 ssize_t res; 221 221 unsigned long flags; 222 - u64 tsf; 222 + unsigned long long tsf; 223 223 224 224 buf_size = min(count, sizeof (really_big_buffer) - 1); 225 225 down(&big_buffer_sem);
+4 -3
drivers/net/wireless/ipw2200.c
··· 10751 10751 mutex_unlock(&priv->mutex); 10752 10752 } 10753 10753 10754 - static int ipw_setup_deferred_work(struct ipw_priv *priv) 10754 + static int __devinit ipw_setup_deferred_work(struct ipw_priv *priv) 10755 10755 { 10756 10756 int ret = 0; 10757 10757 ··· 11600 11600 #endif 11601 11601 11602 11602 11603 - static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 11603 + static int __devinit ipw_pci_probe(struct pci_dev *pdev, 11604 + const struct pci_device_id *ent) 11604 11605 { 11605 11606 int err = 0; 11606 11607 struct net_device *net_dev; ··· 11768 11767 return err; 11769 11768 } 11770 11769 11771 - static void ipw_pci_remove(struct pci_dev *pdev) 11770 + static void __devexit ipw_pci_remove(struct pci_dev *pdev) 11772 11771 { 11773 11772 struct ipw_priv *priv = pci_get_drvdata(pdev); 11774 11773 struct list_head *p, *q;
+4 -1
drivers/net/wireless/iwlwifi/iwl3945-base.c
··· 4743 4743 * when we loaded driver, and is now set to "enable". 4744 4744 * After we're Alive, RF_KILL gets handled by 4745 4745 * iwl_rx_card_state_notif() */ 4746 - if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) 4746 + if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) { 4747 + clear_bit(STATUS_RF_KILL_HW, &priv->status); 4747 4748 queue_work(priv->workqueue, &priv->restart); 4749 + } 4748 4750 4749 4751 handled |= CSR_INT_BIT_RF_KILL; 4750 4752 } ··· 6173 6171 mutex_lock(&priv->mutex); 6174 6172 6175 6173 if (rc) { 6174 + iwl_rate_control_unregister(priv->hw); 6176 6175 IWL_ERROR("Failed to register network " 6177 6176 "device (error %d)\n", rc); 6178 6177 return;
+4 -1
drivers/net/wireless/iwlwifi/iwl4965-base.c
··· 5059 5059 * when we loaded driver, and is now set to "enable". 5060 5060 * After we're Alive, RF_KILL gets handled by 5061 5061 * iwl_rx_card_state_notif() */ 5062 - if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) 5062 + if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) { 5063 + clear_bit(STATUS_RF_KILL_HW, &priv->status); 5063 5064 queue_work(priv->workqueue, &priv->restart); 5065 + } 5064 5066 5065 5067 handled |= CSR_INT_BIT_RF_KILL; 5066 5068 } ··· 6529 6527 mutex_lock(&priv->mutex); 6530 6528 6531 6529 if (rc) { 6530 + iwl_rate_control_unregister(priv->hw); 6532 6531 IWL_ERROR("Failed to register network " 6533 6532 "device (error %d)\n", rc); 6534 6533 return;
+8 -2
drivers/net/wireless/zd1211rw/zd_mac.c
··· 1130 1130 __skb_trim(skb, skb->len - 1131 1131 (IEEE80211_FCS_LEN + sizeof(struct rx_status))); 1132 1132 1133 + ZD_ASSERT(IS_ALIGNED((unsigned long)skb->data, 4)); 1134 + 1133 1135 update_qual_rssi(mac, skb->data, skb->len, stats.signal, 1134 1136 status->signal_strength); 1135 1137 ··· 1168 1166 int zd_mac_rx_irq(struct zd_mac *mac, const u8 *buffer, unsigned int length) 1169 1167 { 1170 1168 struct sk_buff *skb; 1169 + unsigned int reserved = 1170 + ALIGN(max_t(unsigned int, 1171 + sizeof(struct zd_rt_hdr), ZD_PLCP_HEADER_SIZE), 4) - 1172 + ZD_PLCP_HEADER_SIZE; 1171 1173 1172 - skb = dev_alloc_skb(sizeof(struct zd_rt_hdr) + length); 1174 + skb = dev_alloc_skb(reserved + length); 1173 1175 if (!skb) { 1174 1176 struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); 1175 1177 dev_warn(zd_mac_dev(mac), "Could not allocate skb.\n"); 1176 1178 ieee->stats.rx_dropped++; 1177 1179 return -ENOMEM; 1178 1180 } 1179 - skb_reserve(skb, sizeof(struct zd_rt_hdr)); 1181 + skb_reserve(skb, reserved); 1180 1182 memcpy(__skb_put(skb, length), buffer, length); 1181 1183 skb_queue_tail(&mac->rx_queue, skb); 1182 1184 tasklet_schedule(&mac->rx_tasklet);
+1
net/mac80211/ieee80211_rate.c
··· 33 33 if (!strcmp(alg->ops->name, ops->name)) { 34 34 /* don't register an algorithm twice */ 35 35 WARN_ON(1); 36 + mutex_unlock(&rate_ctrl_mutex); 36 37 return -EALREADY; 37 38 } 38 39 }