diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-12-17 18:05:43 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-12-17 18:05:43 -0500 |
commit | 8085106a58366fb2c6c14d89e3d4395d2702d4a1 (patch) | |
tree | 9c349f8ad0d6536cfd16f046776d9c8a71c81c21 | |
parent | 961994a0c2a24d9622eea7144b30ac773169659f (diff) | |
parent | 53e490936a91940a153e231c3b8288e3ecfcc5aa (diff) |
Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
-rw-r--r-- | MAINTAINERS | 6 | ||||
-rw-r--r-- | drivers/net/wireless/Kconfig | 1 | ||||
-rw-r--r-- | drivers/net/wireless/b43/leds.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/main.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/b43/rfkill.c | 37 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 10 | ||||
-rw-r--r-- | net/mac80211/ieee80211_rate.c | 1 |
11 files changed, 76 insertions, 24 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 9507b420751..c331ba391e1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -2489,6 +2489,12 @@ M: mtk.manpages@gmail.com | |||
2489 | W: ftp://ftp.kernel.org/pub/linux/docs/manpages | 2489 | W: ftp://ftp.kernel.org/pub/linux/docs/manpages |
2490 | S: Maintained | 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 | MARVELL MV643XX ETHERNET DRIVER | 2498 | MARVELL MV643XX ETHERNET DRIVER |
2493 | P: Dale Farnsworth | 2499 | P: Dale Farnsworth |
2494 | M: dale@farnsworth.org | 2500 | M: dale@farnsworth.org |
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 2b733c58291..5583719a0dc 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig | |||
@@ -264,6 +264,7 @@ config IPW2200_DEBUG | |||
264 | config LIBERTAS | 264 | config LIBERTAS |
265 | tristate "Marvell 8xxx Libertas WLAN driver support" | 265 | tristate "Marvell 8xxx Libertas WLAN driver support" |
266 | depends on WLAN_80211 | 266 | depends on WLAN_80211 |
267 | select WIRELESS_EXT | ||
267 | select IEEE80211 | 268 | select IEEE80211 |
268 | select FW_LOADER | 269 | select FW_LOADER |
269 | ---help--- | 270 | ---help--- |
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index 19e588582c7..6c0e2b9f776 100644 --- a/drivers/net/wireless/b43/leds.c +++ b/drivers/net/wireless/b43/leds.c | |||
@@ -163,6 +163,9 @@ static void b43_map_led(struct b43_wldev *dev, | |||
163 | b43_register_led(dev, &dev->led_radio, name, | 163 | b43_register_led(dev, &dev->led_radio, name, |
164 | b43_rfkill_led_name(dev), | 164 | b43_rfkill_led_name(dev), |
165 | led_index, activelow); | 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 | break; | 169 | break; |
167 | case B43_LED_WEIRD: | 170 | case B43_LED_WEIRD: |
168 | case B43_LED_ASSOC: | 171 | case B43_LED_ASSOC: |
@@ -232,4 +235,5 @@ void b43_leds_exit(struct b43_wldev *dev) | |||
232 | b43_unregister_led(&dev->led_tx); | 235 | b43_unregister_led(&dev->led_tx); |
233 | b43_unregister_led(&dev->led_rx); | 236 | b43_unregister_led(&dev->led_rx); |
234 | b43_unregister_led(&dev->led_assoc); | 237 | b43_unregister_led(&dev->led_assoc); |
238 | b43_unregister_led(&dev->led_radio); | ||
235 | } | 239 | } |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index b45eecc53c4..1c93b4f4bfe 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -2163,7 +2163,6 @@ static void b43_mgmtframe_txantenna(struct b43_wldev *dev, int antenna) | |||
2163 | static void b43_chip_exit(struct b43_wldev *dev) | 2163 | static void b43_chip_exit(struct b43_wldev *dev) |
2164 | { | 2164 | { |
2165 | b43_radio_turn_off(dev, 1); | 2165 | b43_radio_turn_off(dev, 1); |
2166 | b43_leds_exit(dev); | ||
2167 | b43_gpio_cleanup(dev); | 2166 | b43_gpio_cleanup(dev); |
2168 | /* firmware is released later */ | 2167 | /* firmware is released later */ |
2169 | } | 2168 | } |
@@ -2191,11 +2190,10 @@ static int b43_chip_init(struct b43_wldev *dev) | |||
2191 | err = b43_gpio_init(dev); | 2190 | err = b43_gpio_init(dev); |
2192 | if (err) | 2191 | if (err) |
2193 | goto out; /* firmware is released later */ | 2192 | goto out; /* firmware is released later */ |
2194 | b43_leds_init(dev); | ||
2195 | 2193 | ||
2196 | err = b43_upload_initvals(dev); | 2194 | err = b43_upload_initvals(dev); |
2197 | if (err) | 2195 | if (err) |
2198 | goto err_leds_exit; | 2196 | goto err_gpio_clean; |
2199 | b43_radio_turn_on(dev); | 2197 | b43_radio_turn_on(dev); |
2200 | 2198 | ||
2201 | b43_write16(dev, 0x03E6, 0x0000); | 2199 | b43_write16(dev, 0x03E6, 0x0000); |
@@ -2271,8 +2269,7 @@ out: | |||
2271 | 2269 | ||
2272 | err_radio_off: | 2270 | err_radio_off: |
2273 | b43_radio_turn_off(dev, 1); | 2271 | b43_radio_turn_off(dev, 1); |
2274 | err_leds_exit: | 2272 | err_gpio_clean: |
2275 | b43_leds_exit(dev); | ||
2276 | b43_gpio_cleanup(dev); | 2273 | b43_gpio_cleanup(dev); |
2277 | return err; | 2274 | return err; |
2278 | } | 2275 | } |
@@ -3273,10 +3270,7 @@ static void b43_wireless_core_exit(struct b43_wldev *dev) | |||
3273 | return; | 3270 | return; |
3274 | b43_set_status(dev, B43_STAT_UNINIT); | 3271 | b43_set_status(dev, B43_STAT_UNINIT); |
3275 | 3272 | ||
3276 | mutex_unlock(&dev->wl->mutex); | 3273 | b43_leds_exit(dev); |
3277 | b43_rfkill_exit(dev); | ||
3278 | mutex_lock(&dev->wl->mutex); | ||
3279 | |||
3280 | b43_rng_exit(dev->wl); | 3274 | b43_rng_exit(dev->wl); |
3281 | b43_pio_free(dev); | 3275 | b43_pio_free(dev); |
3282 | b43_dma_free(dev); | 3276 | b43_dma_free(dev); |
@@ -3405,12 +3399,12 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
3405 | memset(wl->mac_addr, 0, ETH_ALEN); | 3399 | memset(wl->mac_addr, 0, ETH_ALEN); |
3406 | b43_upload_card_macaddress(dev); | 3400 | b43_upload_card_macaddress(dev); |
3407 | b43_security_init(dev); | 3401 | b43_security_init(dev); |
3408 | b43_rfkill_init(dev); | ||
3409 | b43_rng_init(wl); | 3402 | b43_rng_init(wl); |
3410 | 3403 | ||
3411 | b43_set_status(dev, B43_STAT_INITIALIZED); | 3404 | b43_set_status(dev, B43_STAT_INITIALIZED); |
3412 | 3405 | ||
3413 | out: | 3406 | b43_leds_init(dev); |
3407 | out: | ||
3414 | return err; | 3408 | return err; |
3415 | 3409 | ||
3416 | err_chip_exit: | 3410 | err_chip_exit: |
@@ -3499,6 +3493,10 @@ static int b43_start(struct ieee80211_hw *hw) | |||
3499 | int did_init = 0; | 3493 | int did_init = 0; |
3500 | int err = 0; | 3494 | int err = 0; |
3501 | 3495 | ||
3496 | /* First register RFkill. | ||
3497 | * LEDs that are registered later depend on it. */ | ||
3498 | b43_rfkill_init(dev); | ||
3499 | |||
3502 | mutex_lock(&wl->mutex); | 3500 | mutex_lock(&wl->mutex); |
3503 | 3501 | ||
3504 | if (b43_status(dev) < B43_STAT_INITIALIZED) { | 3502 | if (b43_status(dev) < B43_STAT_INITIALIZED) { |
@@ -3528,6 +3526,8 @@ static void b43_stop(struct ieee80211_hw *hw) | |||
3528 | struct b43_wl *wl = hw_to_b43_wl(hw); | 3526 | struct b43_wl *wl = hw_to_b43_wl(hw); |
3529 | struct b43_wldev *dev = wl->current_dev; | 3527 | struct b43_wldev *dev = wl->current_dev; |
3530 | 3528 | ||
3529 | b43_rfkill_exit(dev); | ||
3530 | |||
3531 | mutex_lock(&wl->mutex); | 3531 | mutex_lock(&wl->mutex); |
3532 | if (b43_status(dev) >= B43_STAT_STARTED) | 3532 | if (b43_status(dev) >= B43_STAT_STARTED) |
3533 | b43_wireless_core_stop(dev); | 3533 | b43_wireless_core_stop(dev); |
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index 9b1f905ffbf..98cf70c5fd4 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include "rfkill.h" | 25 | #include "rfkill.h" |
26 | #include "b43.h" | 26 | #include "b43.h" |
27 | 27 | ||
28 | #include <linux/kmod.h> | ||
29 | |||
28 | 30 | ||
29 | /* Returns TRUE, if the radio is enabled in hardware. */ | 31 | /* Returns TRUE, if the radio is enabled in hardware. */ |
30 | static bool b43_is_hw_radio_enabled(struct b43_wldev *dev) | 32 | static bool b43_is_hw_radio_enabled(struct b43_wldev *dev) |
@@ -50,7 +52,10 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev) | |||
50 | bool report_change = 0; | 52 | bool report_change = 0; |
51 | 53 | ||
52 | mutex_lock(&wl->mutex); | 54 | mutex_lock(&wl->mutex); |
53 | B43_WARN_ON(b43_status(dev) < B43_STAT_INITIALIZED); | 55 | if (unlikely(b43_status(dev) < B43_STAT_INITIALIZED)) { |
56 | mutex_unlock(&wl->mutex); | ||
57 | return; | ||
58 | } | ||
54 | enabled = b43_is_hw_radio_enabled(dev); | 59 | enabled = b43_is_hw_radio_enabled(dev); |
55 | if (unlikely(enabled != dev->radio_hw_enable)) { | 60 | if (unlikely(enabled != dev->radio_hw_enable)) { |
56 | dev->radio_hw_enable = enabled; | 61 | dev->radio_hw_enable = enabled; |
@@ -60,8 +65,12 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev) | |||
60 | } | 65 | } |
61 | mutex_unlock(&wl->mutex); | 66 | mutex_unlock(&wl->mutex); |
62 | 67 | ||
63 | if (unlikely(report_change)) | 68 | /* send the radio switch event to the system - note both a key press |
64 | input_report_key(poll_dev->input, KEY_WLAN, enabled); | 69 | * and a release are required */ |
70 | if (unlikely(report_change)) { | ||
71 | input_report_key(poll_dev->input, KEY_WLAN, 1); | ||
72 | input_report_key(poll_dev->input, KEY_WLAN, 0); | ||
73 | } | ||
65 | } | 74 | } |
66 | 75 | ||
67 | /* Called when the RFKILL toggled in software. */ | 76 | /* Called when the RFKILL toggled in software. */ |
@@ -69,13 +78,15 @@ static int b43_rfkill_soft_toggle(void *data, enum rfkill_state state) | |||
69 | { | 78 | { |
70 | struct b43_wldev *dev = data; | 79 | struct b43_wldev *dev = data; |
71 | struct b43_wl *wl = dev->wl; | 80 | struct b43_wl *wl = dev->wl; |
72 | int err = 0; | 81 | int err = -EBUSY; |
73 | 82 | ||
74 | if (!wl->rfkill.registered) | 83 | if (!wl->rfkill.registered) |
75 | return 0; | 84 | return 0; |
76 | 85 | ||
77 | mutex_lock(&wl->mutex); | 86 | mutex_lock(&wl->mutex); |
78 | B43_WARN_ON(b43_status(dev) < B43_STAT_INITIALIZED); | 87 | if (b43_status(dev) < B43_STAT_INITIALIZED) |
88 | goto out_unlock; | ||
89 | err = 0; | ||
79 | switch (state) { | 90 | switch (state) { |
80 | case RFKILL_STATE_ON: | 91 | case RFKILL_STATE_ON: |
81 | if (!dev->radio_hw_enable) { | 92 | if (!dev->radio_hw_enable) { |
@@ -133,9 +144,25 @@ void b43_rfkill_init(struct b43_wldev *dev) | |||
133 | rfk->poll_dev->poll = b43_rfkill_poll; | 144 | rfk->poll_dev->poll = b43_rfkill_poll; |
134 | rfk->poll_dev->poll_interval = 1000; /* msecs */ | 145 | rfk->poll_dev->poll_interval = 1000; /* msecs */ |
135 | 146 | ||
147 | rfk->poll_dev->input->name = rfk->name; | ||
148 | rfk->poll_dev->input->id.bustype = BUS_HOST; | ||
149 | rfk->poll_dev->input->id.vendor = dev->dev->bus->boardinfo.vendor; | ||
150 | rfk->poll_dev->input->evbit[0] = BIT(EV_KEY); | ||
151 | set_bit(KEY_WLAN, rfk->poll_dev->input->keybit); | ||
152 | |||
136 | err = rfkill_register(rfk->rfkill); | 153 | err = rfkill_register(rfk->rfkill); |
137 | if (err) | 154 | if (err) |
138 | goto err_free_polldev; | 155 | goto err_free_polldev; |
156 | |||
157 | #ifdef CONFIG_RFKILL_INPUT_MODULE | ||
158 | /* B43 RF-kill isn't useful without the rfkill-input subsystem. | ||
159 | * Try to load the module. */ | ||
160 | err = request_module("rfkill-input"); | ||
161 | if (err) | ||
162 | b43warn(wl, "Failed to load the rfkill-input module. " | ||
163 | "The built-in radio LED will not work.\n"); | ||
164 | #endif /* CONFIG_RFKILL_INPUT */ | ||
165 | |||
139 | err = input_register_polled_device(rfk->poll_dev); | 166 | err = input_register_polled_device(rfk->poll_dev); |
140 | if (err) | 167 | if (err) |
141 | goto err_unreg_rfk; | 168 | goto err_unreg_rfk; |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c index 35dbe455451..76e9dd843fa 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c | |||
@@ -219,7 +219,7 @@ static ssize_t tsf_write_file(struct file *file, const char __user *user_buf, | |||
219 | ssize_t buf_size; | 219 | ssize_t buf_size; |
220 | ssize_t res; | 220 | ssize_t res; |
221 | unsigned long flags; | 221 | unsigned long flags; |
222 | u64 tsf; | 222 | unsigned long long tsf; |
223 | 223 | ||
224 | buf_size = min(count, sizeof (really_big_buffer) - 1); | 224 | buf_size = min(count, sizeof (really_big_buffer) - 1); |
225 | down(&big_buffer_sem); | 225 | down(&big_buffer_sem); |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 54f44e5473c..da51f477e9d 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -10751,7 +10751,7 @@ static void ipw_bg_link_down(struct work_struct *work) | |||
10751 | mutex_unlock(&priv->mutex); | 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 | int ret = 0; | 10756 | int ret = 0; |
10757 | 10757 | ||
@@ -11600,7 +11600,8 @@ static void ipw_prom_free(struct ipw_priv *priv) | |||
11600 | #endif | 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 | int err = 0; | 11606 | int err = 0; |
11606 | struct net_device *net_dev; | 11607 | struct net_device *net_dev; |
@@ -11767,7 +11768,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
11767 | return err; | 11768 | return err; |
11768 | } | 11769 | } |
11769 | 11770 | ||
11770 | static void ipw_pci_remove(struct pci_dev *pdev) | 11771 | static void __devexit ipw_pci_remove(struct pci_dev *pdev) |
11771 | { | 11772 | { |
11772 | struct ipw_priv *priv = pci_get_drvdata(pdev); | 11773 | struct ipw_priv *priv = pci_get_drvdata(pdev); |
11773 | struct list_head *p, *q; | 11774 | struct list_head *p, *q; |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 4bdf237f6ad..3d1da0759b9 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -4743,8 +4743,10 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
4743 | * when we loaded driver, and is now set to "enable". | 4743 | * when we loaded driver, and is now set to "enable". |
4744 | * After we're Alive, RF_KILL gets handled by | 4744 | * After we're Alive, RF_KILL gets handled by |
4745 | * iwl_rx_card_state_notif() */ | 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 | queue_work(priv->workqueue, &priv->restart); | 4748 | queue_work(priv->workqueue, &priv->restart); |
4749 | } | ||
4748 | 4750 | ||
4749 | handled |= CSR_INT_BIT_RF_KILL; | 4751 | handled |= CSR_INT_BIT_RF_KILL; |
4750 | } | 4752 | } |
@@ -6171,6 +6173,7 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
6171 | mutex_lock(&priv->mutex); | 6173 | mutex_lock(&priv->mutex); |
6172 | 6174 | ||
6173 | if (rc) { | 6175 | if (rc) { |
6176 | iwl_rate_control_unregister(priv->hw); | ||
6174 | IWL_ERROR("Failed to register network " | 6177 | IWL_ERROR("Failed to register network " |
6175 | "device (error %d)\n", rc); | 6178 | "device (error %d)\n", rc); |
6176 | return; | 6179 | return; |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 8f85564ec6f..b54fe5e6d52 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -5059,8 +5059,10 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
5059 | * when we loaded driver, and is now set to "enable". | 5059 | * when we loaded driver, and is now set to "enable". |
5060 | * After we're Alive, RF_KILL gets handled by | 5060 | * After we're Alive, RF_KILL gets handled by |
5061 | * iwl_rx_card_state_notif() */ | 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 | queue_work(priv->workqueue, &priv->restart); | 5064 | queue_work(priv->workqueue, &priv->restart); |
5065 | } | ||
5064 | 5066 | ||
5065 | handled |= CSR_INT_BIT_RF_KILL; | 5067 | handled |= CSR_INT_BIT_RF_KILL; |
5066 | } | 5068 | } |
@@ -6527,6 +6529,7 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
6527 | mutex_lock(&priv->mutex); | 6529 | mutex_lock(&priv->mutex); |
6528 | 6530 | ||
6529 | if (rc) { | 6531 | if (rc) { |
6532 | iwl_rate_control_unregister(priv->hw); | ||
6530 | IWL_ERROR("Failed to register network " | 6533 | IWL_ERROR("Failed to register network " |
6531 | "device (error %d)\n", rc); | 6534 | "device (error %d)\n", rc); |
6532 | return; | 6535 | return; |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index a903645e157..5298a8bf112 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -1130,6 +1130,8 @@ static void zd_mac_rx(struct zd_mac *mac, struct sk_buff *skb) | |||
1130 | __skb_trim(skb, skb->len - | 1130 | __skb_trim(skb, skb->len - |
1131 | (IEEE80211_FCS_LEN + sizeof(struct rx_status))); | 1131 | (IEEE80211_FCS_LEN + sizeof(struct rx_status))); |
1132 | 1132 | ||
1133 | ZD_ASSERT(IS_ALIGNED((unsigned long)skb->data, 4)); | ||
1134 | |||
1133 | update_qual_rssi(mac, skb->data, skb->len, stats.signal, | 1135 | update_qual_rssi(mac, skb->data, skb->len, stats.signal, |
1134 | status->signal_strength); | 1136 | status->signal_strength); |
1135 | 1137 | ||
@@ -1166,15 +1168,19 @@ static void do_rx(unsigned long mac_ptr) | |||
1166 | int zd_mac_rx_irq(struct zd_mac *mac, const u8 *buffer, unsigned int length) | 1168 | int zd_mac_rx_irq(struct zd_mac *mac, const u8 *buffer, unsigned int length) |
1167 | { | 1169 | { |
1168 | struct sk_buff *skb; | 1170 | struct sk_buff *skb; |
1171 | unsigned int reserved = | ||
1172 | ALIGN(max_t(unsigned int, | ||
1173 | sizeof(struct zd_rt_hdr), ZD_PLCP_HEADER_SIZE), 4) - | ||
1174 | ZD_PLCP_HEADER_SIZE; | ||
1169 | 1175 | ||
1170 | skb = dev_alloc_skb(sizeof(struct zd_rt_hdr) + length); | 1176 | skb = dev_alloc_skb(reserved + length); |
1171 | if (!skb) { | 1177 | if (!skb) { |
1172 | struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); | 1178 | struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); |
1173 | dev_warn(zd_mac_dev(mac), "Could not allocate skb.\n"); | 1179 | dev_warn(zd_mac_dev(mac), "Could not allocate skb.\n"); |
1174 | ieee->stats.rx_dropped++; | 1180 | ieee->stats.rx_dropped++; |
1175 | return -ENOMEM; | 1181 | return -ENOMEM; |
1176 | } | 1182 | } |
1177 | skb_reserve(skb, sizeof(struct zd_rt_hdr)); | 1183 | skb_reserve(skb, reserved); |
1178 | memcpy(__skb_put(skb, length), buffer, length); | 1184 | memcpy(__skb_put(skb, length), buffer, length); |
1179 | skb_queue_tail(&mac->rx_queue, skb); | 1185 | skb_queue_tail(&mac->rx_queue, skb); |
1180 | tasklet_schedule(&mac->rx_tasklet); | 1186 | tasklet_schedule(&mac->rx_tasklet); |
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c index 7254bd60983..3260a4a0ecc 100644 --- a/net/mac80211/ieee80211_rate.c +++ b/net/mac80211/ieee80211_rate.c | |||
@@ -33,6 +33,7 @@ int ieee80211_rate_control_register(struct rate_control_ops *ops) | |||
33 | if (!strcmp(alg->ops->name, ops->name)) { | 33 | if (!strcmp(alg->ops->name, ops->name)) { |
34 | /* don't register an algorithm twice */ | 34 | /* don't register an algorithm twice */ |
35 | WARN_ON(1); | 35 | WARN_ON(1); |
36 | mutex_unlock(&rate_ctrl_mutex); | ||
36 | return -EALREADY; | 37 | return -EALREADY; |
37 | } | 38 | } |
38 | } | 39 | } |