diff options
author | Jiri Kosina <jkosina@suse.cz> | 2008-05-06 10:57:55 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2008-05-06 10:57:55 -0400 |
commit | 7022b15e2a9f878fd5184586064c63352c3dd225 (patch) | |
tree | 5365c2f5bc82ae1946636ee8d5cd5d3b7e804f1b /drivers/net/wireless | |
parent | aaad2b0c757f3e6e02552cb0bdcd91a5ec0d6305 (diff) | |
parent | a15306365a16380f3bafee9e181ba01231d4acd7 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/net/wireless')
30 files changed, 277 insertions, 227 deletions
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile index 70092191fc53..2c343aae38d4 100644 --- a/drivers/net/wireless/Makefile +++ b/drivers/net/wireless/Makefile | |||
@@ -56,8 +56,7 @@ obj-$(CONFIG_RTL8187) += rtl8187.o | |||
56 | 56 | ||
57 | obj-$(CONFIG_ADM8211) += adm8211.o | 57 | obj-$(CONFIG_ADM8211) += adm8211.o |
58 | 58 | ||
59 | obj-$(CONFIG_IWL3945) += iwlwifi/ | 59 | obj-$(CONFIG_IWLWIFI) += iwlwifi/ |
60 | obj-$(CONFIG_IWL4965) += iwlwifi/ | ||
61 | obj-$(CONFIG_RT2X00) += rt2x00/ | 60 | obj-$(CONFIG_RT2X00) += rt2x00/ |
62 | 61 | ||
63 | obj-$(CONFIG_P54_COMMON) += p54/ | 62 | obj-$(CONFIG_P54_COMMON) += p54/ |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 932d6b1c9d0b..45f47c1c0a35 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -3657,7 +3657,7 @@ void mpi_receive_802_11 (struct airo_info *ai) | |||
3657 | ptr += hdrlen; | 3657 | ptr += hdrlen; |
3658 | if (hdrlen == 24) | 3658 | if (hdrlen == 24) |
3659 | ptr += 6; | 3659 | ptr += 6; |
3660 | gap = le16_to_cpu(get_unaligned((__le16 *)ptr)); | 3660 | gap = get_unaligned_le16(ptr); |
3661 | ptr += sizeof(__le16); | 3661 | ptr += sizeof(__le16); |
3662 | if (gap) { | 3662 | if (gap) { |
3663 | if (gap <= 8) | 3663 | if (gap <= 8) |
@@ -4347,24 +4347,28 @@ static int proc_config_open( struct inode *inode, struct file *file ); | |||
4347 | static int proc_wepkey_open( struct inode *inode, struct file *file ); | 4347 | static int proc_wepkey_open( struct inode *inode, struct file *file ); |
4348 | 4348 | ||
4349 | static const struct file_operations proc_statsdelta_ops = { | 4349 | static const struct file_operations proc_statsdelta_ops = { |
4350 | .owner = THIS_MODULE, | ||
4350 | .read = proc_read, | 4351 | .read = proc_read, |
4351 | .open = proc_statsdelta_open, | 4352 | .open = proc_statsdelta_open, |
4352 | .release = proc_close | 4353 | .release = proc_close |
4353 | }; | 4354 | }; |
4354 | 4355 | ||
4355 | static const struct file_operations proc_stats_ops = { | 4356 | static const struct file_operations proc_stats_ops = { |
4357 | .owner = THIS_MODULE, | ||
4356 | .read = proc_read, | 4358 | .read = proc_read, |
4357 | .open = proc_stats_open, | 4359 | .open = proc_stats_open, |
4358 | .release = proc_close | 4360 | .release = proc_close |
4359 | }; | 4361 | }; |
4360 | 4362 | ||
4361 | static const struct file_operations proc_status_ops = { | 4363 | static const struct file_operations proc_status_ops = { |
4364 | .owner = THIS_MODULE, | ||
4362 | .read = proc_read, | 4365 | .read = proc_read, |
4363 | .open = proc_status_open, | 4366 | .open = proc_status_open, |
4364 | .release = proc_close | 4367 | .release = proc_close |
4365 | }; | 4368 | }; |
4366 | 4369 | ||
4367 | static const struct file_operations proc_SSID_ops = { | 4370 | static const struct file_operations proc_SSID_ops = { |
4371 | .owner = THIS_MODULE, | ||
4368 | .read = proc_read, | 4372 | .read = proc_read, |
4369 | .write = proc_write, | 4373 | .write = proc_write, |
4370 | .open = proc_SSID_open, | 4374 | .open = proc_SSID_open, |
@@ -4372,6 +4376,7 @@ static const struct file_operations proc_SSID_ops = { | |||
4372 | }; | 4376 | }; |
4373 | 4377 | ||
4374 | static const struct file_operations proc_BSSList_ops = { | 4378 | static const struct file_operations proc_BSSList_ops = { |
4379 | .owner = THIS_MODULE, | ||
4375 | .read = proc_read, | 4380 | .read = proc_read, |
4376 | .write = proc_write, | 4381 | .write = proc_write, |
4377 | .open = proc_BSSList_open, | 4382 | .open = proc_BSSList_open, |
@@ -4379,6 +4384,7 @@ static const struct file_operations proc_BSSList_ops = { | |||
4379 | }; | 4384 | }; |
4380 | 4385 | ||
4381 | static const struct file_operations proc_APList_ops = { | 4386 | static const struct file_operations proc_APList_ops = { |
4387 | .owner = THIS_MODULE, | ||
4382 | .read = proc_read, | 4388 | .read = proc_read, |
4383 | .write = proc_write, | 4389 | .write = proc_write, |
4384 | .open = proc_APList_open, | 4390 | .open = proc_APList_open, |
@@ -4386,6 +4392,7 @@ static const struct file_operations proc_APList_ops = { | |||
4386 | }; | 4392 | }; |
4387 | 4393 | ||
4388 | static const struct file_operations proc_config_ops = { | 4394 | static const struct file_operations proc_config_ops = { |
4395 | .owner = THIS_MODULE, | ||
4389 | .read = proc_read, | 4396 | .read = proc_read, |
4390 | .write = proc_write, | 4397 | .write = proc_write, |
4391 | .open = proc_config_open, | 4398 | .open = proc_config_open, |
@@ -4393,6 +4400,7 @@ static const struct file_operations proc_config_ops = { | |||
4393 | }; | 4400 | }; |
4394 | 4401 | ||
4395 | static const struct file_operations proc_wepkey_ops = { | 4402 | static const struct file_operations proc_wepkey_ops = { |
4403 | .owner = THIS_MODULE, | ||
4396 | .read = proc_read, | 4404 | .read = proc_read, |
4397 | .write = proc_write, | 4405 | .write = proc_write, |
4398 | .open = proc_wepkey_open, | 4406 | .open = proc_wepkey_open, |
@@ -4411,10 +4419,6 @@ struct proc_data { | |||
4411 | void (*on_close) (struct inode *, struct file *); | 4419 | void (*on_close) (struct inode *, struct file *); |
4412 | }; | 4420 | }; |
4413 | 4421 | ||
4414 | #ifndef SETPROC_OPS | ||
4415 | #define SETPROC_OPS(entry, ops) (entry)->proc_fops = &(ops) | ||
4416 | #endif | ||
4417 | |||
4418 | static int setup_proc_entry( struct net_device *dev, | 4422 | static int setup_proc_entry( struct net_device *dev, |
4419 | struct airo_info *apriv ) { | 4423 | struct airo_info *apriv ) { |
4420 | struct proc_dir_entry *entry; | 4424 | struct proc_dir_entry *entry; |
@@ -4430,100 +4434,76 @@ static int setup_proc_entry( struct net_device *dev, | |||
4430 | apriv->proc_entry->owner = THIS_MODULE; | 4434 | apriv->proc_entry->owner = THIS_MODULE; |
4431 | 4435 | ||
4432 | /* Setup the StatsDelta */ | 4436 | /* Setup the StatsDelta */ |
4433 | entry = create_proc_entry("StatsDelta", | 4437 | entry = proc_create_data("StatsDelta", |
4434 | S_IFREG | (S_IRUGO&proc_perm), | 4438 | S_IFREG | (S_IRUGO&proc_perm), |
4435 | apriv->proc_entry); | 4439 | apriv->proc_entry, &proc_statsdelta_ops, dev); |
4436 | if (!entry) | 4440 | if (!entry) |
4437 | goto fail_stats_delta; | 4441 | goto fail_stats_delta; |
4438 | entry->uid = proc_uid; | 4442 | entry->uid = proc_uid; |
4439 | entry->gid = proc_gid; | 4443 | entry->gid = proc_gid; |
4440 | entry->data = dev; | ||
4441 | entry->owner = THIS_MODULE; | ||
4442 | SETPROC_OPS(entry, proc_statsdelta_ops); | ||
4443 | 4444 | ||
4444 | /* Setup the Stats */ | 4445 | /* Setup the Stats */ |
4445 | entry = create_proc_entry("Stats", | 4446 | entry = proc_create_data("Stats", |
4446 | S_IFREG | (S_IRUGO&proc_perm), | 4447 | S_IFREG | (S_IRUGO&proc_perm), |
4447 | apriv->proc_entry); | 4448 | apriv->proc_entry, &proc_stats_ops, dev); |
4448 | if (!entry) | 4449 | if (!entry) |
4449 | goto fail_stats; | 4450 | goto fail_stats; |
4450 | entry->uid = proc_uid; | 4451 | entry->uid = proc_uid; |
4451 | entry->gid = proc_gid; | 4452 | entry->gid = proc_gid; |
4452 | entry->data = dev; | ||
4453 | entry->owner = THIS_MODULE; | ||
4454 | SETPROC_OPS(entry, proc_stats_ops); | ||
4455 | 4453 | ||
4456 | /* Setup the Status */ | 4454 | /* Setup the Status */ |
4457 | entry = create_proc_entry("Status", | 4455 | entry = proc_create_data("Status", |
4458 | S_IFREG | (S_IRUGO&proc_perm), | 4456 | S_IFREG | (S_IRUGO&proc_perm), |
4459 | apriv->proc_entry); | 4457 | apriv->proc_entry, &proc_status_ops, dev); |
4460 | if (!entry) | 4458 | if (!entry) |
4461 | goto fail_status; | 4459 | goto fail_status; |
4462 | entry->uid = proc_uid; | 4460 | entry->uid = proc_uid; |
4463 | entry->gid = proc_gid; | 4461 | entry->gid = proc_gid; |
4464 | entry->data = dev; | ||
4465 | entry->owner = THIS_MODULE; | ||
4466 | SETPROC_OPS(entry, proc_status_ops); | ||
4467 | 4462 | ||
4468 | /* Setup the Config */ | 4463 | /* Setup the Config */ |
4469 | entry = create_proc_entry("Config", | 4464 | entry = proc_create_data("Config", |
4470 | S_IFREG | proc_perm, | 4465 | S_IFREG | proc_perm, |
4471 | apriv->proc_entry); | 4466 | apriv->proc_entry, &proc_config_ops, dev); |
4472 | if (!entry) | 4467 | if (!entry) |
4473 | goto fail_config; | 4468 | goto fail_config; |
4474 | entry->uid = proc_uid; | 4469 | entry->uid = proc_uid; |
4475 | entry->gid = proc_gid; | 4470 | entry->gid = proc_gid; |
4476 | entry->data = dev; | ||
4477 | entry->owner = THIS_MODULE; | ||
4478 | SETPROC_OPS(entry, proc_config_ops); | ||
4479 | 4471 | ||
4480 | /* Setup the SSID */ | 4472 | /* Setup the SSID */ |
4481 | entry = create_proc_entry("SSID", | 4473 | entry = proc_create_data("SSID", |
4482 | S_IFREG | proc_perm, | 4474 | S_IFREG | proc_perm, |
4483 | apriv->proc_entry); | 4475 | apriv->proc_entry, &proc_SSID_ops, dev); |
4484 | if (!entry) | 4476 | if (!entry) |
4485 | goto fail_ssid; | 4477 | goto fail_ssid; |
4486 | entry->uid = proc_uid; | 4478 | entry->uid = proc_uid; |
4487 | entry->gid = proc_gid; | 4479 | entry->gid = proc_gid; |
4488 | entry->data = dev; | ||
4489 | entry->owner = THIS_MODULE; | ||
4490 | SETPROC_OPS(entry, proc_SSID_ops); | ||
4491 | 4480 | ||
4492 | /* Setup the APList */ | 4481 | /* Setup the APList */ |
4493 | entry = create_proc_entry("APList", | 4482 | entry = proc_create_data("APList", |
4494 | S_IFREG | proc_perm, | 4483 | S_IFREG | proc_perm, |
4495 | apriv->proc_entry); | 4484 | apriv->proc_entry, &proc_APList_ops, dev); |
4496 | if (!entry) | 4485 | if (!entry) |
4497 | goto fail_aplist; | 4486 | goto fail_aplist; |
4498 | entry->uid = proc_uid; | 4487 | entry->uid = proc_uid; |
4499 | entry->gid = proc_gid; | 4488 | entry->gid = proc_gid; |
4500 | entry->data = dev; | ||
4501 | entry->owner = THIS_MODULE; | ||
4502 | SETPROC_OPS(entry, proc_APList_ops); | ||
4503 | 4489 | ||
4504 | /* Setup the BSSList */ | 4490 | /* Setup the BSSList */ |
4505 | entry = create_proc_entry("BSSList", | 4491 | entry = proc_create_data("BSSList", |
4506 | S_IFREG | proc_perm, | 4492 | S_IFREG | proc_perm, |
4507 | apriv->proc_entry); | 4493 | apriv->proc_entry, &proc_BSSList_ops, dev); |
4508 | if (!entry) | 4494 | if (!entry) |
4509 | goto fail_bsslist; | 4495 | goto fail_bsslist; |
4510 | entry->uid = proc_uid; | 4496 | entry->uid = proc_uid; |
4511 | entry->gid = proc_gid; | 4497 | entry->gid = proc_gid; |
4512 | entry->data = dev; | ||
4513 | entry->owner = THIS_MODULE; | ||
4514 | SETPROC_OPS(entry, proc_BSSList_ops); | ||
4515 | 4498 | ||
4516 | /* Setup the WepKey */ | 4499 | /* Setup the WepKey */ |
4517 | entry = create_proc_entry("WepKey", | 4500 | entry = proc_create_data("WepKey", |
4518 | S_IFREG | proc_perm, | 4501 | S_IFREG | proc_perm, |
4519 | apriv->proc_entry); | 4502 | apriv->proc_entry, &proc_wepkey_ops, dev); |
4520 | if (!entry) | 4503 | if (!entry) |
4521 | goto fail_wepkey; | 4504 | goto fail_wepkey; |
4522 | entry->uid = proc_uid; | 4505 | entry->uid = proc_uid; |
4523 | entry->gid = proc_gid; | 4506 | entry->gid = proc_gid; |
4524 | entry->data = dev; | ||
4525 | entry->owner = THIS_MODULE; | ||
4526 | SETPROC_OPS(entry, proc_wepkey_ops); | ||
4527 | 4507 | ||
4528 | return 0; | 4508 | return 0; |
4529 | 4509 | ||
@@ -5625,9 +5605,9 @@ static int __init airo_init_module( void ) | |||
5625 | int have_isa_dev = 0; | 5605 | int have_isa_dev = 0; |
5626 | #endif | 5606 | #endif |
5627 | 5607 | ||
5628 | airo_entry = create_proc_entry("aironet", | 5608 | airo_entry = create_proc_entry("driver/aironet", |
5629 | S_IFDIR | airo_perm, | 5609 | S_IFDIR | airo_perm, |
5630 | proc_root_driver); | 5610 | NULL); |
5631 | 5611 | ||
5632 | if (airo_entry) { | 5612 | if (airo_entry) { |
5633 | airo_entry->uid = proc_uid; | 5613 | airo_entry->uid = proc_uid; |
@@ -5651,7 +5631,7 @@ static int __init airo_init_module( void ) | |||
5651 | airo_print_info("", "Finished probing for PCI adapters"); | 5631 | airo_print_info("", "Finished probing for PCI adapters"); |
5652 | 5632 | ||
5653 | if (i) { | 5633 | if (i) { |
5654 | remove_proc_entry("aironet", proc_root_driver); | 5634 | remove_proc_entry("driver/aironet", NULL); |
5655 | return i; | 5635 | return i; |
5656 | } | 5636 | } |
5657 | #endif | 5637 | #endif |
@@ -5673,7 +5653,7 @@ static void __exit airo_cleanup_module( void ) | |||
5673 | #ifdef CONFIG_PCI | 5653 | #ifdef CONFIG_PCI |
5674 | pci_unregister_driver(&airo_driver); | 5654 | pci_unregister_driver(&airo_driver); |
5675 | #endif | 5655 | #endif |
5676 | remove_proc_entry("aironet", proc_root_driver); | 5656 | remove_proc_entry("driver/aironet", NULL); |
5677 | } | 5657 | } |
5678 | 5658 | ||
5679 | /* | 5659 | /* |
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index e18305b781c9..4e5c8fc35200 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -58,10 +58,6 @@ | |||
58 | #include "reg.h" | 58 | #include "reg.h" |
59 | #include "debug.h" | 59 | #include "debug.h" |
60 | 60 | ||
61 | /* unaligned little endian access */ | ||
62 | #define LE_READ_2(_p) (le16_to_cpu(get_unaligned((__le16 *)(_p)))) | ||
63 | #define LE_READ_4(_p) (le32_to_cpu(get_unaligned((__le32 *)(_p)))) | ||
64 | |||
65 | enum { | 61 | enum { |
66 | ATH_LED_TX, | 62 | ATH_LED_TX, |
67 | ATH_LED_RX, | 63 | ATH_LED_RX, |
@@ -2909,9 +2905,9 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw, | |||
2909 | if (!mclist) | 2905 | if (!mclist) |
2910 | break; | 2906 | break; |
2911 | /* calculate XOR of eight 6-bit values */ | 2907 | /* calculate XOR of eight 6-bit values */ |
2912 | val = LE_READ_4(mclist->dmi_addr + 0); | 2908 | val = get_unaligned_le32(mclist->dmi_addr + 0); |
2913 | pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; | 2909 | pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; |
2914 | val = LE_READ_4(mclist->dmi_addr + 3); | 2910 | val = get_unaligned_le32(mclist->dmi_addr + 3); |
2915 | pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; | 2911 | pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; |
2916 | pos &= 0x3f; | 2912 | pos &= 0x3f; |
2917 | mfilt[pos / 32] |= (1 << (pos % 32)); | 2913 | mfilt[pos / 32] |= (1 << (pos % 32)); |
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c index 87e782291a01..5fb1ae6ad3e2 100644 --- a/drivers/net/wireless/ath5k/hw.c +++ b/drivers/net/wireless/ath5k/hw.c | |||
@@ -304,14 +304,20 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version) | |||
304 | ah->ah_radio = AR5K_RF2413; | 304 | ah->ah_radio = AR5K_RF2413; |
305 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; | 305 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; |
306 | } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC2) { | 306 | } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC2) { |
307 | |||
308 | ah->ah_radio = AR5K_RF5413; | 307 | ah->ah_radio = AR5K_RF5413; |
308 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; | ||
309 | } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_5133) { | ||
309 | 310 | ||
310 | if (ah->ah_mac_srev <= AR5K_SREV_VER_AR5424 && | 311 | /* AR5424 */ |
311 | ah->ah_mac_srev >= AR5K_SREV_VER_AR2424) | 312 | if (srev >= AR5K_SREV_VER_AR5424) { |
313 | ah->ah_radio = AR5K_RF5413; | ||
312 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5424; | 314 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5424; |
313 | else | 315 | /* AR2424 */ |
316 | } else { | ||
317 | ah->ah_radio = AR5K_RF2413; /* For testing */ | ||
314 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; | 318 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; |
319 | } | ||
320 | |||
315 | /* | 321 | /* |
316 | * Register returns 0x4 for radio revision | 322 | * Register returns 0x4 for radio revision |
317 | * so ath5k_hw_radio_revision doesn't parse the value | 323 | * so ath5k_hw_radio_revision doesn't parse the value |
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index eff2a158a411..37783cdd301a 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -691,6 +691,10 @@ struct b43_wl { | |||
691 | 691 | ||
692 | struct mutex mutex; | 692 | struct mutex mutex; |
693 | spinlock_t irq_lock; | 693 | spinlock_t irq_lock; |
694 | /* R/W lock for data transmission. | ||
695 | * Transmissions on 2+ queues can run concurrently, but somebody else | ||
696 | * might sync with TX by write_lock_irqsave()'ing. */ | ||
697 | rwlock_t tx_lock; | ||
694 | /* Lock for LEDs access. */ | 698 | /* Lock for LEDs access. */ |
695 | spinlock_t leds_lock; | 699 | spinlock_t leds_lock; |
696 | /* Lock for SHM access. */ | 700 | /* Lock for SHM access. */ |
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 21c886a9a1d9..6dcbb3c87e72 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -980,6 +980,42 @@ void b43_dma_free(struct b43_wldev *dev) | |||
980 | destroy_ring(dma, tx_ring_mcast); | 980 | destroy_ring(dma, tx_ring_mcast); |
981 | } | 981 | } |
982 | 982 | ||
983 | static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask) | ||
984 | { | ||
985 | u64 orig_mask = mask; | ||
986 | bool fallback = 0; | ||
987 | int err; | ||
988 | |||
989 | /* Try to set the DMA mask. If it fails, try falling back to a | ||
990 | * lower mask, as we can always also support a lower one. */ | ||
991 | while (1) { | ||
992 | err = ssb_dma_set_mask(dev->dev, mask); | ||
993 | if (!err) | ||
994 | break; | ||
995 | if (mask == DMA_64BIT_MASK) { | ||
996 | mask = DMA_32BIT_MASK; | ||
997 | fallback = 1; | ||
998 | continue; | ||
999 | } | ||
1000 | if (mask == DMA_32BIT_MASK) { | ||
1001 | mask = DMA_30BIT_MASK; | ||
1002 | fallback = 1; | ||
1003 | continue; | ||
1004 | } | ||
1005 | b43err(dev->wl, "The machine/kernel does not support " | ||
1006 | "the required %u-bit DMA mask\n", | ||
1007 | (unsigned int)dma_mask_to_engine_type(orig_mask)); | ||
1008 | return -EOPNOTSUPP; | ||
1009 | } | ||
1010 | if (fallback) { | ||
1011 | b43info(dev->wl, "DMA mask fallback from %u-bit to %u-bit\n", | ||
1012 | (unsigned int)dma_mask_to_engine_type(orig_mask), | ||
1013 | (unsigned int)dma_mask_to_engine_type(mask)); | ||
1014 | } | ||
1015 | |||
1016 | return 0; | ||
1017 | } | ||
1018 | |||
983 | int b43_dma_init(struct b43_wldev *dev) | 1019 | int b43_dma_init(struct b43_wldev *dev) |
984 | { | 1020 | { |
985 | struct b43_dma *dma = &dev->dma; | 1021 | struct b43_dma *dma = &dev->dma; |
@@ -989,14 +1025,9 @@ int b43_dma_init(struct b43_wldev *dev) | |||
989 | 1025 | ||
990 | dmamask = supported_dma_mask(dev); | 1026 | dmamask = supported_dma_mask(dev); |
991 | type = dma_mask_to_engine_type(dmamask); | 1027 | type = dma_mask_to_engine_type(dmamask); |
992 | err = ssb_dma_set_mask(dev->dev, dmamask); | 1028 | err = b43_dma_set_mask(dev, dmamask); |
993 | if (err) { | 1029 | if (err) |
994 | b43err(dev->wl, "The machine/kernel does not support " | 1030 | return err; |
995 | "the required DMA mask (0x%08X%08X)\n", | ||
996 | (unsigned int)((dmamask & 0xFFFFFFFF00000000ULL) >> 32), | ||
997 | (unsigned int)(dmamask & 0x00000000FFFFFFFFULL)); | ||
998 | return -EOPNOTSUPP; | ||
999 | } | ||
1000 | 1031 | ||
1001 | err = -ENOMEM; | 1032 | err = -ENOMEM; |
1002 | /* setup TX DMA channels. */ | 1033 | /* setup TX DMA channels. */ |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 943cc851c504..8fdba9415c04 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -84,6 +84,10 @@ int b43_modparam_qos = 1; | |||
84 | module_param_named(qos, b43_modparam_qos, int, 0444); | 84 | module_param_named(qos, b43_modparam_qos, int, 0444); |
85 | MODULE_PARM_DESC(qos, "Enable QOS support (default on)"); | 85 | MODULE_PARM_DESC(qos, "Enable QOS support (default on)"); |
86 | 86 | ||
87 | static int modparam_btcoex = 1; | ||
88 | module_param_named(btcoex, modparam_btcoex, int, 0444); | ||
89 | MODULE_PARM_DESC(btcoex, "Enable Bluetooth coexistance (default on)"); | ||
90 | |||
87 | 91 | ||
88 | static const struct ssb_device_id b43_ssb_tbl[] = { | 92 | static const struct ssb_device_id b43_ssb_tbl[] = { |
89 | SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 5), | 93 | SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 5), |
@@ -725,6 +729,7 @@ static void b43_synchronize_irq(struct b43_wldev *dev) | |||
725 | */ | 729 | */ |
726 | void b43_dummy_transmission(struct b43_wldev *dev) | 730 | void b43_dummy_transmission(struct b43_wldev *dev) |
727 | { | 731 | { |
732 | struct b43_wl *wl = dev->wl; | ||
728 | struct b43_phy *phy = &dev->phy; | 733 | struct b43_phy *phy = &dev->phy; |
729 | unsigned int i, max_loop; | 734 | unsigned int i, max_loop; |
730 | u16 value; | 735 | u16 value; |
@@ -751,6 +756,9 @@ void b43_dummy_transmission(struct b43_wldev *dev) | |||
751 | return; | 756 | return; |
752 | } | 757 | } |
753 | 758 | ||
759 | spin_lock_irq(&wl->irq_lock); | ||
760 | write_lock(&wl->tx_lock); | ||
761 | |||
754 | for (i = 0; i < 5; i++) | 762 | for (i = 0; i < 5; i++) |
755 | b43_ram_write(dev, i * 4, buffer[i]); | 763 | b43_ram_write(dev, i * 4, buffer[i]); |
756 | 764 | ||
@@ -791,6 +799,9 @@ void b43_dummy_transmission(struct b43_wldev *dev) | |||
791 | } | 799 | } |
792 | if (phy->radio_ver == 0x2050 && phy->radio_rev <= 0x5) | 800 | if (phy->radio_ver == 0x2050 && phy->radio_rev <= 0x5) |
793 | b43_radio_write16(dev, 0x0051, 0x0037); | 801 | b43_radio_write16(dev, 0x0051, 0x0037); |
802 | |||
803 | write_unlock(&wl->tx_lock); | ||
804 | spin_unlock_irq(&wl->irq_lock); | ||
794 | } | 805 | } |
795 | 806 | ||
796 | static void key_write(struct b43_wldev *dev, | 807 | static void key_write(struct b43_wldev *dev, |
@@ -2167,7 +2178,7 @@ static int b43_write_initvals(struct b43_wldev *dev, | |||
2167 | goto err_format; | 2178 | goto err_format; |
2168 | array_size -= sizeof(iv->data.d32); | 2179 | array_size -= sizeof(iv->data.d32); |
2169 | 2180 | ||
2170 | value = be32_to_cpu(get_unaligned(&iv->data.d32)); | 2181 | value = get_unaligned_be32(&iv->data.d32); |
2171 | b43_write32(dev, offset, value); | 2182 | b43_write32(dev, offset, value); |
2172 | 2183 | ||
2173 | iv = (const struct b43_iv *)((const uint8_t *)iv + | 2184 | iv = (const struct b43_iv *)((const uint8_t *)iv + |
@@ -2836,24 +2847,31 @@ static int b43_op_tx(struct ieee80211_hw *hw, | |||
2836 | { | 2847 | { |
2837 | struct b43_wl *wl = hw_to_b43_wl(hw); | 2848 | struct b43_wl *wl = hw_to_b43_wl(hw); |
2838 | struct b43_wldev *dev = wl->current_dev; | 2849 | struct b43_wldev *dev = wl->current_dev; |
2839 | int err = -ENODEV; | 2850 | unsigned long flags; |
2851 | int err; | ||
2840 | 2852 | ||
2841 | if (unlikely(skb->len < 2 + 2 + 6)) { | 2853 | if (unlikely(skb->len < 2 + 2 + 6)) { |
2842 | /* Too short, this can't be a valid frame. */ | 2854 | /* Too short, this can't be a valid frame. */ |
2843 | return -EINVAL; | 2855 | dev_kfree_skb_any(skb); |
2856 | return NETDEV_TX_OK; | ||
2844 | } | 2857 | } |
2845 | B43_WARN_ON(skb_shinfo(skb)->nr_frags); | 2858 | B43_WARN_ON(skb_shinfo(skb)->nr_frags); |
2846 | |||
2847 | if (unlikely(!dev)) | 2859 | if (unlikely(!dev)) |
2848 | goto out; | 2860 | return NETDEV_TX_BUSY; |
2849 | if (unlikely(b43_status(dev) < B43_STAT_STARTED)) | 2861 | |
2850 | goto out; | 2862 | /* Transmissions on seperate queues can run concurrently. */ |
2851 | /* TX is done without a global lock. */ | 2863 | read_lock_irqsave(&wl->tx_lock, flags); |
2852 | if (b43_using_pio_transfers(dev)) | 2864 | |
2853 | err = b43_pio_tx(dev, skb, ctl); | 2865 | err = -ENODEV; |
2854 | else | 2866 | if (likely(b43_status(dev) >= B43_STAT_STARTED)) { |
2855 | err = b43_dma_tx(dev, skb, ctl); | 2867 | if (b43_using_pio_transfers(dev)) |
2856 | out: | 2868 | err = b43_pio_tx(dev, skb, ctl); |
2869 | else | ||
2870 | err = b43_dma_tx(dev, skb, ctl); | ||
2871 | } | ||
2872 | |||
2873 | read_unlock_irqrestore(&wl->tx_lock, flags); | ||
2874 | |||
2857 | if (unlikely(err)) | 2875 | if (unlikely(err)) |
2858 | return NETDEV_TX_BUSY; | 2876 | return NETDEV_TX_BUSY; |
2859 | return NETDEV_TX_OK; | 2877 | return NETDEV_TX_OK; |
@@ -3472,7 +3490,9 @@ static void b43_wireless_core_stop(struct b43_wldev *dev) | |||
3472 | spin_unlock_irqrestore(&wl->irq_lock, flags); | 3490 | spin_unlock_irqrestore(&wl->irq_lock, flags); |
3473 | b43_synchronize_irq(dev); | 3491 | b43_synchronize_irq(dev); |
3474 | 3492 | ||
3493 | write_lock_irqsave(&wl->tx_lock, flags); | ||
3475 | b43_set_status(dev, B43_STAT_INITIALIZED); | 3494 | b43_set_status(dev, B43_STAT_INITIALIZED); |
3495 | write_unlock_irqrestore(&wl->tx_lock, flags); | ||
3476 | 3496 | ||
3477 | b43_pio_stop(dev); | 3497 | b43_pio_stop(dev); |
3478 | mutex_unlock(&wl->mutex); | 3498 | mutex_unlock(&wl->mutex); |
@@ -3481,8 +3501,6 @@ static void b43_wireless_core_stop(struct b43_wldev *dev) | |||
3481 | cancel_delayed_work_sync(&dev->periodic_work); | 3501 | cancel_delayed_work_sync(&dev->periodic_work); |
3482 | mutex_lock(&wl->mutex); | 3502 | mutex_lock(&wl->mutex); |
3483 | 3503 | ||
3484 | ieee80211_stop_queues(wl->hw); //FIXME this could cause a deadlock, as mac80211 seems buggy. | ||
3485 | |||
3486 | b43_mac_suspend(dev); | 3504 | b43_mac_suspend(dev); |
3487 | free_irq(dev->dev->irq, dev); | 3505 | free_irq(dev->dev->irq, dev); |
3488 | b43dbg(wl, "Wireless interface stopped\n"); | 3506 | b43dbg(wl, "Wireless interface stopped\n"); |
@@ -3706,8 +3724,10 @@ static void setup_struct_wldev_for_init(struct b43_wldev *dev) | |||
3706 | static void b43_bluetooth_coext_enable(struct b43_wldev *dev) | 3724 | static void b43_bluetooth_coext_enable(struct b43_wldev *dev) |
3707 | { | 3725 | { |
3708 | struct ssb_sprom *sprom = &dev->dev->bus->sprom; | 3726 | struct ssb_sprom *sprom = &dev->dev->bus->sprom; |
3709 | u32 hf; | 3727 | u64 hf; |
3710 | 3728 | ||
3729 | if (!modparam_btcoex) | ||
3730 | return; | ||
3711 | if (!(sprom->boardflags_lo & B43_BFL_BTCOEXIST)) | 3731 | if (!(sprom->boardflags_lo & B43_BFL_BTCOEXIST)) |
3712 | return; | 3732 | return; |
3713 | if (dev->phy.type != B43_PHYTYPE_B && !dev->phy.gmode) | 3733 | if (dev->phy.type != B43_PHYTYPE_B && !dev->phy.gmode) |
@@ -3719,11 +3739,13 @@ static void b43_bluetooth_coext_enable(struct b43_wldev *dev) | |||
3719 | else | 3739 | else |
3720 | hf |= B43_HF_BTCOEX; | 3740 | hf |= B43_HF_BTCOEX; |
3721 | b43_hf_write(dev, hf); | 3741 | b43_hf_write(dev, hf); |
3722 | //TODO | ||
3723 | } | 3742 | } |
3724 | 3743 | ||
3725 | static void b43_bluetooth_coext_disable(struct b43_wldev *dev) | 3744 | static void b43_bluetooth_coext_disable(struct b43_wldev *dev) |
3726 | { //TODO | 3745 | { |
3746 | if (!modparam_btcoex) | ||
3747 | return; | ||
3748 | //TODO | ||
3727 | } | 3749 | } |
3728 | 3750 | ||
3729 | static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev) | 3751 | static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev) |
@@ -3852,7 +3874,8 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
3852 | struct ssb_sprom *sprom = &bus->sprom; | 3874 | struct ssb_sprom *sprom = &bus->sprom; |
3853 | struct b43_phy *phy = &dev->phy; | 3875 | struct b43_phy *phy = &dev->phy; |
3854 | int err; | 3876 | int err; |
3855 | u32 hf, tmp; | 3877 | u64 hf; |
3878 | u32 tmp; | ||
3856 | 3879 | ||
3857 | B43_WARN_ON(b43_status(dev) != B43_STAT_UNINIT); | 3880 | B43_WARN_ON(b43_status(dev) != B43_STAT_UNINIT); |
3858 | 3881 | ||
@@ -4317,6 +4340,14 @@ static int b43_wireless_core_attach(struct b43_wldev *dev) | |||
4317 | err = -EOPNOTSUPP; | 4340 | err = -EOPNOTSUPP; |
4318 | goto err_powerdown; | 4341 | goto err_powerdown; |
4319 | } | 4342 | } |
4343 | if (1 /* disable A-PHY */) { | ||
4344 | /* FIXME: For now we disable the A-PHY on multi-PHY devices. */ | ||
4345 | if (dev->phy.type != B43_PHYTYPE_N) { | ||
4346 | have_2ghz_phy = 1; | ||
4347 | have_5ghz_phy = 0; | ||
4348 | } | ||
4349 | } | ||
4350 | |||
4320 | dev->phy.gmode = have_2ghz_phy; | 4351 | dev->phy.gmode = have_2ghz_phy; |
4321 | tmp = dev->phy.gmode ? B43_TMSLOW_GMODE : 0; | 4352 | tmp = dev->phy.gmode ? B43_TMSLOW_GMODE : 0; |
4322 | b43_wireless_core_reset(dev, tmp); | 4353 | b43_wireless_core_reset(dev, tmp); |
@@ -4414,8 +4445,16 @@ static int b43_one_core_attach(struct ssb_device *dev, struct b43_wl *wl) | |||
4414 | return err; | 4445 | return err; |
4415 | } | 4446 | } |
4416 | 4447 | ||
4448 | #define IS_PDEV(pdev, _vendor, _device, _subvendor, _subdevice) ( \ | ||
4449 | (pdev->vendor == PCI_VENDOR_ID_##_vendor) && \ | ||
4450 | (pdev->device == _device) && \ | ||
4451 | (pdev->subsystem_vendor == PCI_VENDOR_ID_##_subvendor) && \ | ||
4452 | (pdev->subsystem_device == _subdevice) ) | ||
4453 | |||
4417 | static void b43_sprom_fixup(struct ssb_bus *bus) | 4454 | static void b43_sprom_fixup(struct ssb_bus *bus) |
4418 | { | 4455 | { |
4456 | struct pci_dev *pdev; | ||
4457 | |||
4419 | /* boardflags workarounds */ | 4458 | /* boardflags workarounds */ |
4420 | if (bus->boardinfo.vendor == SSB_BOARDVENDOR_DELL && | 4459 | if (bus->boardinfo.vendor == SSB_BOARDVENDOR_DELL && |
4421 | bus->chip_id == 0x4301 && bus->boardinfo.rev == 0x74) | 4460 | bus->chip_id == 0x4301 && bus->boardinfo.rev == 0x74) |
@@ -4423,6 +4462,13 @@ static void b43_sprom_fixup(struct ssb_bus *bus) | |||
4423 | if (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE && | 4462 | if (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE && |
4424 | bus->boardinfo.type == 0x4E && bus->boardinfo.rev > 0x40) | 4463 | bus->boardinfo.type == 0x4E && bus->boardinfo.rev > 0x40) |
4425 | bus->sprom.boardflags_lo |= B43_BFL_PACTRL; | 4464 | bus->sprom.boardflags_lo |= B43_BFL_PACTRL; |
4465 | if (bus->bustype == SSB_BUSTYPE_PCI) { | ||
4466 | pdev = bus->host_pci; | ||
4467 | if (IS_PDEV(pdev, BROADCOM, 0x4318, ASUSTEK, 0x100F) || | ||
4468 | IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0015) || | ||
4469 | IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0013)) | ||
4470 | bus->sprom.boardflags_lo &= ~B43_BFL_BTCOEXIST; | ||
4471 | } | ||
4426 | } | 4472 | } |
4427 | 4473 | ||
4428 | static void b43_wireless_exit(struct ssb_device *dev, struct b43_wl *wl) | 4474 | static void b43_wireless_exit(struct ssb_device *dev, struct b43_wl *wl) |
@@ -4466,6 +4512,7 @@ static int b43_wireless_init(struct ssb_device *dev) | |||
4466 | memset(wl, 0, sizeof(*wl)); | 4512 | memset(wl, 0, sizeof(*wl)); |
4467 | wl->hw = hw; | 4513 | wl->hw = hw; |
4468 | spin_lock_init(&wl->irq_lock); | 4514 | spin_lock_init(&wl->irq_lock); |
4515 | rwlock_init(&wl->tx_lock); | ||
4469 | spin_lock_init(&wl->leds_lock); | 4516 | spin_lock_init(&wl->leds_lock); |
4470 | spin_lock_init(&wl->shm_lock); | 4517 | spin_lock_init(&wl->shm_lock); |
4471 | mutex_init(&wl->mutex); | 4518 | mutex_init(&wl->mutex); |
diff --git a/drivers/net/wireless/b43/phy.c b/drivers/net/wireless/b43/phy.c index 575c5436ebdf..de024dc03718 100644 --- a/drivers/net/wireless/b43/phy.c +++ b/drivers/net/wireless/b43/phy.c | |||
@@ -2043,7 +2043,7 @@ int b43_phy_init(struct b43_wldev *dev) | |||
2043 | void b43_set_rx_antenna(struct b43_wldev *dev, int antenna) | 2043 | void b43_set_rx_antenna(struct b43_wldev *dev, int antenna) |
2044 | { | 2044 | { |
2045 | struct b43_phy *phy = &dev->phy; | 2045 | struct b43_phy *phy = &dev->phy; |
2046 | u32 hf; | 2046 | u64 hf; |
2047 | u16 tmp; | 2047 | u16 tmp; |
2048 | int autodiv = 0; | 2048 | int autodiv = 0; |
2049 | 2049 | ||
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index ef829ee8ffd4..14a5eea2573e 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -1720,7 +1720,7 @@ static int b43legacy_write_initvals(struct b43legacy_wldev *dev, | |||
1720 | goto err_format; | 1720 | goto err_format; |
1721 | array_size -= sizeof(iv->data.d32); | 1721 | array_size -= sizeof(iv->data.d32); |
1722 | 1722 | ||
1723 | value = be32_to_cpu(get_unaligned(&iv->data.d32)); | 1723 | value = get_unaligned_be32(&iv->data.d32); |
1724 | b43legacy_write32(dev, offset, value); | 1724 | b43legacy_write32(dev, offset, value); |
1725 | 1725 | ||
1726 | iv = (const struct b43legacy_iv *)((const uint8_t *)iv + | 1726 | iv = (const struct b43legacy_iv *)((const uint8_t *)iv + |
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index f844b738d34e..d5b7a76fcaad 100644 --- a/drivers/net/wireless/iwlwifi/Kconfig +++ b/drivers/net/wireless/iwlwifi/Kconfig | |||
@@ -1,6 +1,15 @@ | |||
1 | config IWLWIFI | ||
2 | bool | ||
3 | default n | ||
4 | |||
1 | config IWLCORE | 5 | config IWLCORE |
2 | tristate "Intel Wireless Wifi Core" | 6 | tristate "Intel Wireless Wifi Core" |
3 | depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL | 7 | depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL |
8 | select IWLWIFI | ||
9 | select MAC80211_LEDS if IWLWIFI_LEDS | ||
10 | select LEDS_CLASS if IWLWIFI_LEDS | ||
11 | select RFKILL if IWLWIFI_RFKILL | ||
12 | select RFKILL_INPUT if IWLWIFI_RFKILL | ||
4 | 13 | ||
5 | config IWLWIFI_LEDS | 14 | config IWLWIFI_LEDS |
6 | bool | 15 | bool |
@@ -9,8 +18,6 @@ config IWLWIFI_LEDS | |||
9 | config IWLWIFI_RFKILL | 18 | config IWLWIFI_RFKILL |
10 | boolean "IWLWIFI RF kill support" | 19 | boolean "IWLWIFI RF kill support" |
11 | depends on IWLCORE | 20 | depends on IWLCORE |
12 | select RFKILL | ||
13 | select RFKILL_INPUT | ||
14 | 21 | ||
15 | config IWL4965 | 22 | config IWL4965 |
16 | tristate "Intel Wireless WiFi 4965AGN" | 23 | tristate "Intel Wireless WiFi 4965AGN" |
@@ -49,7 +56,7 @@ config IWL4965_HT | |||
49 | 56 | ||
50 | config IWL4965_LEDS | 57 | config IWL4965_LEDS |
51 | bool "Enable LEDS features in iwl4965 driver" | 58 | bool "Enable LEDS features in iwl4965 driver" |
52 | depends on IWL4965 && MAC80211_LEDS && LEDS_CLASS | 59 | depends on IWL4965 |
53 | select IWLWIFI_LEDS | 60 | select IWLWIFI_LEDS |
54 | ---help--- | 61 | ---help--- |
55 | This option enables LEDS for the iwlwifi drivers | 62 | This option enables LEDS for the iwlwifi drivers |
@@ -104,6 +111,9 @@ config IWL3945 | |||
104 | tristate "Intel PRO/Wireless 3945ABG/BG Network Connection" | 111 | tristate "Intel PRO/Wireless 3945ABG/BG Network Connection" |
105 | depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL | 112 | depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL |
106 | select FW_LOADER | 113 | select FW_LOADER |
114 | select IWLWIFI | ||
115 | select MAC80211_LEDS if IWL3945_LEDS | ||
116 | select LEDS_CLASS if IWL3945_LEDS | ||
107 | ---help--- | 117 | ---help--- |
108 | Select to build the driver supporting the: | 118 | Select to build the driver supporting the: |
109 | 119 | ||
@@ -134,7 +144,7 @@ config IWL3945_SPECTRUM_MEASUREMENT | |||
134 | 144 | ||
135 | config IWL3945_LEDS | 145 | config IWL3945_LEDS |
136 | bool "Enable LEDS features in iwl3945 driver" | 146 | bool "Enable LEDS features in iwl3945 driver" |
137 | depends on IWL3945 && MAC80211_LEDS && LEDS_CLASS | 147 | depends on IWL3945 |
138 | ---help--- | 148 | ---help--- |
139 | This option enables LEDS for the iwl3945 driver. | 149 | This option enables LEDS for the iwl3945 driver. |
140 | 150 | ||
diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile index 4f3e88b12e3a..ec6187b75c3b 100644 --- a/drivers/net/wireless/iwlwifi/Makefile +++ b/drivers/net/wireless/iwlwifi/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-$(CONFIG_IWLCORE) := iwlcore.o | 1 | obj-$(CONFIG_IWLCORE) += iwlcore.o |
2 | iwlcore-objs := iwl-core.o iwl-eeprom.o iwl-hcmd.o | 2 | iwlcore-objs := iwl-core.o iwl-eeprom.o iwl-hcmd.o |
3 | iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o | 3 | iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o |
4 | iwlcore-$(CONFIG_IWLWIFI_LEDS) += iwl-led.o | 4 | iwlcore-$(CONFIG_IWLWIFI_LEDS) += iwl-led.o |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 598e4eef4f40..d3406830c8e3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -554,40 +554,36 @@ static void iwl3945_add_radiotap(struct iwl3945_priv *priv, | |||
554 | iwl3945_rt->rt_hdr.it_pad = 0; | 554 | iwl3945_rt->rt_hdr.it_pad = 0; |
555 | 555 | ||
556 | /* total header + data */ | 556 | /* total header + data */ |
557 | put_unaligned(cpu_to_le16(sizeof(*iwl3945_rt)), | 557 | put_unaligned_le16(sizeof(*iwl3945_rt), &iwl3945_rt->rt_hdr.it_len); |
558 | &iwl3945_rt->rt_hdr.it_len); | ||
559 | 558 | ||
560 | /* Indicate all the fields we add to the radiotap header */ | 559 | /* Indicate all the fields we add to the radiotap header */ |
561 | put_unaligned(cpu_to_le32((1 << IEEE80211_RADIOTAP_TSFT) | | 560 | put_unaligned_le32((1 << IEEE80211_RADIOTAP_TSFT) | |
562 | (1 << IEEE80211_RADIOTAP_FLAGS) | | 561 | (1 << IEEE80211_RADIOTAP_FLAGS) | |
563 | (1 << IEEE80211_RADIOTAP_RATE) | | 562 | (1 << IEEE80211_RADIOTAP_RATE) | |
564 | (1 << IEEE80211_RADIOTAP_CHANNEL) | | 563 | (1 << IEEE80211_RADIOTAP_CHANNEL) | |
565 | (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | | 564 | (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | |
566 | (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | | 565 | (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | |
567 | (1 << IEEE80211_RADIOTAP_ANTENNA)), | 566 | (1 << IEEE80211_RADIOTAP_ANTENNA), |
568 | &iwl3945_rt->rt_hdr.it_present); | 567 | &iwl3945_rt->rt_hdr.it_present); |
569 | 568 | ||
570 | /* Zero the flags, we'll add to them as we go */ | 569 | /* Zero the flags, we'll add to them as we go */ |
571 | iwl3945_rt->rt_flags = 0; | 570 | iwl3945_rt->rt_flags = 0; |
572 | 571 | ||
573 | put_unaligned(cpu_to_le64(tsf), &iwl3945_rt->rt_tsf); | 572 | put_unaligned_le64(tsf, &iwl3945_rt->rt_tsf); |
574 | 573 | ||
575 | iwl3945_rt->rt_dbmsignal = signal; | 574 | iwl3945_rt->rt_dbmsignal = signal; |
576 | iwl3945_rt->rt_dbmnoise = noise; | 575 | iwl3945_rt->rt_dbmnoise = noise; |
577 | 576 | ||
578 | /* Convert the channel frequency and set the flags */ | 577 | /* Convert the channel frequency and set the flags */ |
579 | put_unaligned(cpu_to_le16(stats->freq), &iwl3945_rt->rt_channelMHz); | 578 | put_unaligned_le16(stats->freq, &iwl3945_rt->rt_channelMHz); |
580 | if (!(phy_flags_hw & RX_RES_PHY_FLAGS_BAND_24_MSK)) | 579 | if (!(phy_flags_hw & RX_RES_PHY_FLAGS_BAND_24_MSK)) |
581 | put_unaligned(cpu_to_le16(IEEE80211_CHAN_OFDM | | 580 | put_unaligned_le16(IEEE80211_CHAN_OFDM | IEEE80211_CHAN_5GHZ, |
582 | IEEE80211_CHAN_5GHZ), | ||
583 | &iwl3945_rt->rt_chbitmask); | 581 | &iwl3945_rt->rt_chbitmask); |
584 | else if (phy_flags_hw & RX_RES_PHY_FLAGS_MOD_CCK_MSK) | 582 | else if (phy_flags_hw & RX_RES_PHY_FLAGS_MOD_CCK_MSK) |
585 | put_unaligned(cpu_to_le16(IEEE80211_CHAN_CCK | | 583 | put_unaligned_le16(IEEE80211_CHAN_CCK | IEEE80211_CHAN_2GHZ, |
586 | IEEE80211_CHAN_2GHZ), | ||
587 | &iwl3945_rt->rt_chbitmask); | 584 | &iwl3945_rt->rt_chbitmask); |
588 | else /* 802.11g */ | 585 | else /* 802.11g */ |
589 | put_unaligned(cpu_to_le16(IEEE80211_CHAN_OFDM | | 586 | put_unaligned_le16(IEEE80211_CHAN_OFDM | IEEE80211_CHAN_2GHZ, |
590 | IEEE80211_CHAN_2GHZ), | ||
591 | &iwl3945_rt->rt_chbitmask); | 587 | &iwl3945_rt->rt_chbitmask); |
592 | 588 | ||
593 | if (rate == -1) | 589 | if (rate == -1) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index 45c1c5533bf0..c7695a215a39 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h | |||
@@ -742,7 +742,6 @@ struct iwl3945_priv { | |||
742 | u8 direct_ssid_len; | 742 | u8 direct_ssid_len; |
743 | u8 direct_ssid[IW_ESSID_MAX_SIZE]; | 743 | u8 direct_ssid[IW_ESSID_MAX_SIZE]; |
744 | struct iwl3945_scan_cmd *scan; | 744 | struct iwl3945_scan_cmd *scan; |
745 | u8 only_active_channel; | ||
746 | 745 | ||
747 | /* spinlock */ | 746 | /* spinlock */ |
748 | spinlock_t lock; /* protect general shared data */ | 747 | spinlock_t lock; /* protect general shared data */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index 9ed13cb0a2a9..581b98556c86 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -996,7 +996,6 @@ struct iwl_priv { | |||
996 | u8 direct_ssid_len; | 996 | u8 direct_ssid_len; |
997 | u8 direct_ssid[IW_ESSID_MAX_SIZE]; | 997 | u8 direct_ssid[IW_ESSID_MAX_SIZE]; |
998 | struct iwl4965_scan_cmd *scan; | 998 | struct iwl4965_scan_cmd *scan; |
999 | u8 only_active_channel; | ||
1000 | 999 | ||
1001 | /* spinlock */ | 1000 | /* spinlock */ |
1002 | spinlock_t lock; /* protect general shared data */ | 1001 | spinlock_t lock; /* protect general shared data */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 1a5678fe4224..13925b627e3b 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -4968,17 +4968,6 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv, | |||
4968 | if (channels[i].flags & IEEE80211_CHAN_DISABLED) | 4968 | if (channels[i].flags & IEEE80211_CHAN_DISABLED) |
4969 | continue; | 4969 | continue; |
4970 | 4970 | ||
4971 | if (channels[i].hw_value == | ||
4972 | le16_to_cpu(priv->active_rxon.channel)) { | ||
4973 | if (iwl3945_is_associated(priv)) { | ||
4974 | IWL_DEBUG_SCAN | ||
4975 | ("Skipping current channel %d\n", | ||
4976 | le16_to_cpu(priv->active_rxon.channel)); | ||
4977 | continue; | ||
4978 | } | ||
4979 | } else if (priv->only_active_channel) | ||
4980 | continue; | ||
4981 | |||
4982 | scan_ch->channel = channels[i].hw_value; | 4971 | scan_ch->channel = channels[i].hw_value; |
4983 | 4972 | ||
4984 | ch_info = iwl3945_get_channel_info(priv, band, scan_ch->channel); | 4973 | ch_info = iwl3945_get_channel_info(priv, band, scan_ch->channel); |
@@ -6303,12 +6292,17 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
6303 | priv->direct_ssid, priv->direct_ssid_len); | 6292 | priv->direct_ssid, priv->direct_ssid_len); |
6304 | direct_mask = 1; | 6293 | direct_mask = 1; |
6305 | } else if (!iwl3945_is_associated(priv) && priv->essid_len) { | 6294 | } else if (!iwl3945_is_associated(priv) && priv->essid_len) { |
6295 | IWL_DEBUG_SCAN | ||
6296 | ("Kicking off one direct scan for '%s' when not associated\n", | ||
6297 | iwl3945_escape_essid(priv->essid, priv->essid_len)); | ||
6306 | scan->direct_scan[0].id = WLAN_EID_SSID; | 6298 | scan->direct_scan[0].id = WLAN_EID_SSID; |
6307 | scan->direct_scan[0].len = priv->essid_len; | 6299 | scan->direct_scan[0].len = priv->essid_len; |
6308 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); | 6300 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); |
6309 | direct_mask = 1; | 6301 | direct_mask = 1; |
6310 | } else | 6302 | } else { |
6303 | IWL_DEBUG_SCAN("Kicking off one indirect scan.\n"); | ||
6311 | direct_mask = 0; | 6304 | direct_mask = 0; |
6305 | } | ||
6312 | 6306 | ||
6313 | /* We don't build a direct scan probe request; the uCode will do | 6307 | /* We don't build a direct scan probe request; the uCode will do |
6314 | * that based on the direct_mask added to each channel entry */ | 6308 | * that based on the direct_mask added to each channel entry */ |
@@ -6346,23 +6340,18 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
6346 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) | 6340 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) |
6347 | scan->filter_flags = RXON_FILTER_PROMISC_MSK; | 6341 | scan->filter_flags = RXON_FILTER_PROMISC_MSK; |
6348 | 6342 | ||
6349 | if (direct_mask) { | 6343 | if (direct_mask) |
6350 | IWL_DEBUG_SCAN | ||
6351 | ("Initiating direct scan for %s.\n", | ||
6352 | iwl3945_escape_essid(priv->essid, priv->essid_len)); | ||
6353 | scan->channel_count = | 6344 | scan->channel_count = |
6354 | iwl3945_get_channels_for_scan( | 6345 | iwl3945_get_channels_for_scan( |
6355 | priv, band, 1, /* active */ | 6346 | priv, band, 1, /* active */ |
6356 | direct_mask, | 6347 | direct_mask, |
6357 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); | 6348 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); |
6358 | } else { | 6349 | else |
6359 | IWL_DEBUG_SCAN("Initiating indirect scan.\n"); | ||
6360 | scan->channel_count = | 6350 | scan->channel_count = |
6361 | iwl3945_get_channels_for_scan( | 6351 | iwl3945_get_channels_for_scan( |
6362 | priv, band, 0, /* passive */ | 6352 | priv, band, 0, /* passive */ |
6363 | direct_mask, | 6353 | direct_mask, |
6364 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); | 6354 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); |
6365 | } | ||
6366 | 6355 | ||
6367 | cmd.len += le16_to_cpu(scan->tx_cmd.len) + | 6356 | cmd.len += le16_to_cpu(scan->tx_cmd.len) + |
6368 | scan->channel_count * sizeof(struct iwl3945_scan_channel); | 6357 | scan->channel_count * sizeof(struct iwl3945_scan_channel); |
@@ -6907,7 +6896,6 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
6907 | 6896 | ||
6908 | if (priv->vif != vif) { | 6897 | if (priv->vif != vif) { |
6909 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | 6898 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); |
6910 | mutex_unlock(&priv->mutex); | ||
6911 | return 0; | 6899 | return 0; |
6912 | } | 6900 | } |
6913 | 6901 | ||
@@ -7315,8 +7303,6 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) | |||
7315 | return; | 7303 | return; |
7316 | } | 7304 | } |
7317 | 7305 | ||
7318 | priv->only_active_channel = 0; | ||
7319 | |||
7320 | iwl3945_set_rate(priv); | 7306 | iwl3945_set_rate(priv); |
7321 | 7307 | ||
7322 | mutex_unlock(&priv->mutex); | 7308 | mutex_unlock(&priv->mutex); |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index d7e2358a213a..883b42f7e998 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -4633,17 +4633,6 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv, | |||
4633 | if (channels[i].flags & IEEE80211_CHAN_DISABLED) | 4633 | if (channels[i].flags & IEEE80211_CHAN_DISABLED) |
4634 | continue; | 4634 | continue; |
4635 | 4635 | ||
4636 | if (ieee80211_frequency_to_channel(channels[i].center_freq) == | ||
4637 | le16_to_cpu(priv->active_rxon.channel)) { | ||
4638 | if (iwl_is_associated(priv)) { | ||
4639 | IWL_DEBUG_SCAN | ||
4640 | ("Skipping current channel %d\n", | ||
4641 | le16_to_cpu(priv->active_rxon.channel)); | ||
4642 | continue; | ||
4643 | } | ||
4644 | } else if (priv->only_active_channel) | ||
4645 | continue; | ||
4646 | |||
4647 | scan_ch->channel = ieee80211_frequency_to_channel(channels[i].center_freq); | 4636 | scan_ch->channel = ieee80211_frequency_to_channel(channels[i].center_freq); |
4648 | 4637 | ||
4649 | ch_info = iwl_get_channel_info(priv, band, | 4638 | ch_info = iwl_get_channel_info(priv, band, |
@@ -5824,11 +5813,15 @@ static void iwl4965_bg_request_scan(struct work_struct *data) | |||
5824 | priv->direct_ssid, priv->direct_ssid_len); | 5813 | priv->direct_ssid, priv->direct_ssid_len); |
5825 | direct_mask = 1; | 5814 | direct_mask = 1; |
5826 | } else if (!iwl_is_associated(priv) && priv->essid_len) { | 5815 | } else if (!iwl_is_associated(priv) && priv->essid_len) { |
5816 | IWL_DEBUG_SCAN | ||
5817 | ("Kicking off one direct scan for '%s' when not associated\n", | ||
5818 | iwl4965_escape_essid(priv->essid, priv->essid_len)); | ||
5827 | scan->direct_scan[0].id = WLAN_EID_SSID; | 5819 | scan->direct_scan[0].id = WLAN_EID_SSID; |
5828 | scan->direct_scan[0].len = priv->essid_len; | 5820 | scan->direct_scan[0].len = priv->essid_len; |
5829 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); | 5821 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); |
5830 | direct_mask = 1; | 5822 | direct_mask = 1; |
5831 | } else { | 5823 | } else { |
5824 | IWL_DEBUG_SCAN("Kicking off one indirect scan.\n"); | ||
5832 | direct_mask = 0; | 5825 | direct_mask = 0; |
5833 | } | 5826 | } |
5834 | 5827 | ||
@@ -5881,23 +5874,18 @@ static void iwl4965_bg_request_scan(struct work_struct *data) | |||
5881 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) | 5874 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) |
5882 | scan->filter_flags = RXON_FILTER_PROMISC_MSK; | 5875 | scan->filter_flags = RXON_FILTER_PROMISC_MSK; |
5883 | 5876 | ||
5884 | if (direct_mask) { | 5877 | if (direct_mask) |
5885 | IWL_DEBUG_SCAN | ||
5886 | ("Initiating direct scan for %s.\n", | ||
5887 | iwl4965_escape_essid(priv->essid, priv->essid_len)); | ||
5888 | scan->channel_count = | 5878 | scan->channel_count = |
5889 | iwl4965_get_channels_for_scan( | 5879 | iwl4965_get_channels_for_scan( |
5890 | priv, band, 1, /* active */ | 5880 | priv, band, 1, /* active */ |
5891 | direct_mask, | 5881 | direct_mask, |
5892 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); | 5882 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); |
5893 | } else { | 5883 | else |
5894 | IWL_DEBUG_SCAN("Initiating indirect scan.\n"); | ||
5895 | scan->channel_count = | 5884 | scan->channel_count = |
5896 | iwl4965_get_channels_for_scan( | 5885 | iwl4965_get_channels_for_scan( |
5897 | priv, band, 0, /* passive */ | 5886 | priv, band, 0, /* passive */ |
5898 | direct_mask, | 5887 | direct_mask, |
5899 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); | 5888 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); |
5900 | } | ||
5901 | 5889 | ||
5902 | cmd.len += le16_to_cpu(scan->tx_cmd.len) + | 5890 | cmd.len += le16_to_cpu(scan->tx_cmd.len) + |
5903 | scan->channel_count * sizeof(struct iwl4965_scan_channel); | 5891 | scan->channel_count * sizeof(struct iwl4965_scan_channel); |
@@ -6473,7 +6461,6 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | |||
6473 | 6461 | ||
6474 | if (priv->vif != vif) { | 6462 | if (priv->vif != vif) { |
6475 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | 6463 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); |
6476 | mutex_unlock(&priv->mutex); | ||
6477 | return 0; | 6464 | return 0; |
6478 | } | 6465 | } |
6479 | 6466 | ||
@@ -7062,8 +7049,6 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw) | |||
7062 | return; | 7049 | return; |
7063 | } | 7050 | } |
7064 | 7051 | ||
7065 | priv->only_active_channel = 0; | ||
7066 | |||
7067 | iwl4965_set_rate(priv); | 7052 | iwl4965_set_rate(priv); |
7068 | 7053 | ||
7069 | mutex_unlock(&priv->mutex); | 7054 | mutex_unlock(&priv->mutex); |
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index e72c97a0d6c1..d448c9702a0f 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -298,7 +298,8 @@ static int lbs_do_scan(struct lbs_private *priv, uint8_t bsstype, | |||
298 | uint8_t *tlv; /* pointer into our current, growing TLV storage area */ | 298 | uint8_t *tlv; /* pointer into our current, growing TLV storage area */ |
299 | 299 | ||
300 | lbs_deb_enter_args(LBS_DEB_SCAN, "bsstype %d, chanlist[].chan %d, chan_count %d", | 300 | lbs_deb_enter_args(LBS_DEB_SCAN, "bsstype %d, chanlist[].chan %d, chan_count %d", |
301 | bsstype, chan_list[0].channumber, chan_count); | 301 | bsstype, chan_list ? chan_list[0].channumber : -1, |
302 | chan_count); | ||
302 | 303 | ||
303 | /* create the fixed part for scan command */ | 304 | /* create the fixed part for scan command */ |
304 | scan_cmd = kzalloc(MAX_SCAN_CFG_ALLOC, GFP_KERNEL); | 305 | scan_cmd = kzalloc(MAX_SCAN_CFG_ALLOC, GFP_KERNEL); |
@@ -522,7 +523,7 @@ static int lbs_process_bss(struct bss_descriptor *bss, | |||
522 | 523 | ||
523 | if (*bytesleft >= sizeof(beaconsize)) { | 524 | if (*bytesleft >= sizeof(beaconsize)) { |
524 | /* Extract & convert beacon size from the command buffer */ | 525 | /* Extract & convert beacon size from the command buffer */ |
525 | beaconsize = le16_to_cpu(get_unaligned((__le16 *)*pbeaconinfo)); | 526 | beaconsize = get_unaligned_le16(*pbeaconinfo); |
526 | *bytesleft -= sizeof(beaconsize); | 527 | *bytesleft -= sizeof(beaconsize); |
527 | *pbeaconinfo += sizeof(beaconsize); | 528 | *pbeaconinfo += sizeof(beaconsize); |
528 | } | 529 | } |
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index e5b3c282009c..5b375b289036 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -1186,7 +1186,7 @@ prism54_get_encode(struct net_device *ndev, struct iw_request_info *info, | |||
1186 | rvalue |= mgt_get_request(priv, DOT11_OID_DEFKEYID, 0, NULL, &r); | 1186 | rvalue |= mgt_get_request(priv, DOT11_OID_DEFKEYID, 0, NULL, &r); |
1187 | devindex = r.u; | 1187 | devindex = r.u; |
1188 | /* Now get the key, return it */ | 1188 | /* Now get the key, return it */ |
1189 | if ((index < 0) || (index > 3)) | 1189 | if (index == -1 || index > 3) |
1190 | /* no index provided, use the current one */ | 1190 | /* no index provided, use the current one */ |
1191 | index = devindex; | 1191 | index = devindex; |
1192 | rvalue |= mgt_get_request(priv, DOT11_OID_DEFKEYX, index, NULL, &r); | 1192 | rvalue |= mgt_get_request(priv, DOT11_OID_DEFKEYX, index, NULL, &r); |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 977751f372ff..d0b1fb15c709 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -2402,7 +2402,6 @@ static int bcm4320_early_init(struct usbnet *dev) | |||
2402 | priv->param_power_output = modparam_power_output; | 2402 | priv->param_power_output = modparam_power_output; |
2403 | priv->param_roamtrigger = modparam_roamtrigger; | 2403 | priv->param_roamtrigger = modparam_roamtrigger; |
2404 | priv->param_roamdelta = modparam_roamdelta; | 2404 | priv->param_roamdelta = modparam_roamdelta; |
2405 | priv->param_workaround_interval = modparam_workaround_interval; | ||
2406 | 2405 | ||
2407 | priv->param_country[0] = toupper(priv->param_country[0]); | 2406 | priv->param_country[0] = toupper(priv->param_country[0]); |
2408 | priv->param_country[1] = toupper(priv->param_country[1]); | 2407 | priv->param_country[1] = toupper(priv->param_country[1]); |
@@ -2425,8 +2424,10 @@ static int bcm4320_early_init(struct usbnet *dev) | |||
2425 | else if (priv->param_roamdelta > 2) | 2424 | else if (priv->param_roamdelta > 2) |
2426 | priv->param_roamdelta = 2; | 2425 | priv->param_roamdelta = 2; |
2427 | 2426 | ||
2428 | if (priv->param_workaround_interval < 0) | 2427 | if (modparam_workaround_interval < 0) |
2429 | priv->param_workaround_interval = 500; | 2428 | priv->param_workaround_interval = 500; |
2429 | else | ||
2430 | priv->param_workaround_interval = modparam_workaround_interval; | ||
2430 | 2431 | ||
2431 | rndis_set_config_parameter_str(dev, "Country", priv->param_country); | 2432 | rndis_set_config_parameter_str(dev, "Country", priv->param_country); |
2432 | rndis_set_config_parameter_str(dev, "FrameBursting", | 2433 | rndis_set_config_parameter_str(dev, "FrameBursting", |
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig index a1e3938cba9b..ab1029e79884 100644 --- a/drivers/net/wireless/rt2x00/Kconfig +++ b/drivers/net/wireless/rt2x00/Kconfig | |||
@@ -60,7 +60,8 @@ config RT2400PCI_RFKILL | |||
60 | 60 | ||
61 | config RT2400PCI_LEDS | 61 | config RT2400PCI_LEDS |
62 | bool "RT2400 leds support" | 62 | bool "RT2400 leds support" |
63 | depends on RT2400PCI && LEDS_CLASS | 63 | depends on RT2400PCI |
64 | select LEDS_CLASS | ||
64 | select RT2X00_LIB_LEDS | 65 | select RT2X00_LIB_LEDS |
65 | ---help--- | 66 | ---help--- |
66 | This adds support for led triggers provided my mac80211. | 67 | This adds support for led triggers provided my mac80211. |
@@ -86,7 +87,8 @@ config RT2500PCI_RFKILL | |||
86 | 87 | ||
87 | config RT2500PCI_LEDS | 88 | config RT2500PCI_LEDS |
88 | bool "RT2500 leds support" | 89 | bool "RT2500 leds support" |
89 | depends on RT2500PCI && LEDS_CLASS | 90 | depends on RT2500PCI |
91 | select LEDS_CLASS | ||
90 | select RT2X00_LIB_LEDS | 92 | select RT2X00_LIB_LEDS |
91 | ---help--- | 93 | ---help--- |
92 | This adds support for led triggers provided my mac80211. | 94 | This adds support for led triggers provided my mac80211. |
@@ -114,7 +116,8 @@ config RT61PCI_RFKILL | |||
114 | 116 | ||
115 | config RT61PCI_LEDS | 117 | config RT61PCI_LEDS |
116 | bool "RT61 leds support" | 118 | bool "RT61 leds support" |
117 | depends on RT61PCI && LEDS_CLASS | 119 | depends on RT61PCI |
120 | select LEDS_CLASS | ||
118 | select RT2X00_LIB_LEDS | 121 | select RT2X00_LIB_LEDS |
119 | ---help--- | 122 | ---help--- |
120 | This adds support for led triggers provided my mac80211. | 123 | This adds support for led triggers provided my mac80211. |
@@ -130,7 +133,8 @@ config RT2500USB | |||
130 | 133 | ||
131 | config RT2500USB_LEDS | 134 | config RT2500USB_LEDS |
132 | bool "RT2500 leds support" | 135 | bool "RT2500 leds support" |
133 | depends on RT2500USB && LEDS_CLASS | 136 | depends on RT2500USB |
137 | select LEDS_CLASS | ||
134 | select RT2X00_LIB_LEDS | 138 | select RT2X00_LIB_LEDS |
135 | ---help--- | 139 | ---help--- |
136 | This adds support for led triggers provided my mac80211. | 140 | This adds support for led triggers provided my mac80211. |
@@ -148,7 +152,8 @@ config RT73USB | |||
148 | 152 | ||
149 | config RT73USB_LEDS | 153 | config RT73USB_LEDS |
150 | bool "RT73 leds support" | 154 | bool "RT73 leds support" |
151 | depends on RT73USB && LEDS_CLASS | 155 | depends on RT73USB |
156 | select LEDS_CLASS | ||
152 | select RT2X00_LIB_LEDS | 157 | select RT2X00_LIB_LEDS |
153 | ---help--- | 158 | ---help--- |
154 | This adds support for led triggers provided my mac80211. | 159 | This adds support for led triggers provided my mac80211. |
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index b41187af1306..560b9c73c0b9 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -363,7 +363,7 @@ static void rt2400pci_config_erp(struct rt2x00_dev *rt2x00dev, | |||
363 | rt2x00pci_register_write(rt2x00dev, TXCSR1, reg); | 363 | rt2x00pci_register_write(rt2x00dev, TXCSR1, reg); |
364 | 364 | ||
365 | rt2x00pci_register_read(rt2x00dev, ARCSR2, ®); | 365 | rt2x00pci_register_read(rt2x00dev, ARCSR2, ®); |
366 | rt2x00_set_field32(®, ARCSR2_SIGNAL, 0x00 | preamble_mask); | 366 | rt2x00_set_field32(®, ARCSR2_SIGNAL, 0x00); |
367 | rt2x00_set_field32(®, ARCSR2_SERVICE, 0x04); | 367 | rt2x00_set_field32(®, ARCSR2_SERVICE, 0x04); |
368 | rt2x00_set_field32(®, ARCSR2_LENGTH, get_duration(ACK_SIZE, 10)); | 368 | rt2x00_set_field32(®, ARCSR2_LENGTH, get_duration(ACK_SIZE, 10)); |
369 | rt2x00pci_register_write(rt2x00dev, ARCSR2, reg); | 369 | rt2x00pci_register_write(rt2x00dev, ARCSR2, reg); |
@@ -1308,7 +1308,7 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1308 | 1308 | ||
1309 | if (value == LED_MODE_TXRX_ACTIVITY) { | 1309 | if (value == LED_MODE_TXRX_ACTIVITY) { |
1310 | rt2x00dev->led_qual.rt2x00dev = rt2x00dev; | 1310 | rt2x00dev->led_qual.rt2x00dev = rt2x00dev; |
1311 | rt2x00dev->led_radio.type = LED_TYPE_ACTIVITY; | 1311 | rt2x00dev->led_qual.type = LED_TYPE_ACTIVITY; |
1312 | rt2x00dev->led_qual.led_dev.brightness_set = | 1312 | rt2x00dev->led_qual.led_dev.brightness_set = |
1313 | rt2400pci_brightness_set; | 1313 | rt2400pci_brightness_set; |
1314 | rt2x00dev->led_qual.led_dev.blink_set = | 1314 | rt2x00dev->led_qual.led_dev.blink_set = |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 5ade097ed45e..a5ed54b69262 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -370,7 +370,7 @@ static void rt2500pci_config_erp(struct rt2x00_dev *rt2x00dev, | |||
370 | rt2x00pci_register_write(rt2x00dev, TXCSR1, reg); | 370 | rt2x00pci_register_write(rt2x00dev, TXCSR1, reg); |
371 | 371 | ||
372 | rt2x00pci_register_read(rt2x00dev, ARCSR2, ®); | 372 | rt2x00pci_register_read(rt2x00dev, ARCSR2, ®); |
373 | rt2x00_set_field32(®, ARCSR2_SIGNAL, 0x00 | preamble_mask); | 373 | rt2x00_set_field32(®, ARCSR2_SIGNAL, 0x00); |
374 | rt2x00_set_field32(®, ARCSR2_SERVICE, 0x04); | 374 | rt2x00_set_field32(®, ARCSR2_SERVICE, 0x04); |
375 | rt2x00_set_field32(®, ARCSR2_LENGTH, get_duration(ACK_SIZE, 10)); | 375 | rt2x00_set_field32(®, ARCSR2_LENGTH, get_duration(ACK_SIZE, 10)); |
376 | rt2x00pci_register_write(rt2x00dev, ARCSR2, reg); | 376 | rt2x00pci_register_write(rt2x00dev, ARCSR2, reg); |
@@ -1485,7 +1485,7 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1485 | 1485 | ||
1486 | if (value == LED_MODE_TXRX_ACTIVITY) { | 1486 | if (value == LED_MODE_TXRX_ACTIVITY) { |
1487 | rt2x00dev->led_qual.rt2x00dev = rt2x00dev; | 1487 | rt2x00dev->led_qual.rt2x00dev = rt2x00dev; |
1488 | rt2x00dev->led_radio.type = LED_TYPE_ACTIVITY; | 1488 | rt2x00dev->led_qual.type = LED_TYPE_ACTIVITY; |
1489 | rt2x00dev->led_qual.led_dev.brightness_set = | 1489 | rt2x00dev->led_qual.led_dev.brightness_set = |
1490 | rt2500pci_brightness_set; | 1490 | rt2500pci_brightness_set; |
1491 | rt2x00dev->led_qual.led_dev.blink_set = | 1491 | rt2x00dev->led_qual.led_dev.blink_set = |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 6bb07b339325..fdbd0ef2be4b 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1394,7 +1394,7 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1394 | 1394 | ||
1395 | if (value == LED_MODE_TXRX_ACTIVITY) { | 1395 | if (value == LED_MODE_TXRX_ACTIVITY) { |
1396 | rt2x00dev->led_qual.rt2x00dev = rt2x00dev; | 1396 | rt2x00dev->led_qual.rt2x00dev = rt2x00dev; |
1397 | rt2x00dev->led_radio.type = LED_TYPE_ACTIVITY; | 1397 | rt2x00dev->led_qual.type = LED_TYPE_ACTIVITY; |
1398 | rt2x00dev->led_qual.led_dev.brightness_set = | 1398 | rt2x00dev->led_qual.led_dev.brightness_set = |
1399 | rt2500usb_brightness_set; | 1399 | rt2500usb_brightness_set; |
1400 | rt2x00dev->led_qual.led_dev.blink_set = | 1400 | rt2x00dev->led_qual.led_dev.blink_set = |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index f8fe7a139a8a..8d8657fb64dd 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -114,6 +114,7 @@ int rt2x00lib_enable_radio(struct rt2x00_dev *rt2x00dev) | |||
114 | return status; | 114 | return status; |
115 | 115 | ||
116 | rt2x00leds_led_radio(rt2x00dev, true); | 116 | rt2x00leds_led_radio(rt2x00dev, true); |
117 | rt2x00led_led_activity(rt2x00dev, true); | ||
117 | 118 | ||
118 | __set_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags); | 119 | __set_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags); |
119 | 120 | ||
@@ -157,6 +158,7 @@ void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev) | |||
157 | * Disable radio. | 158 | * Disable radio. |
158 | */ | 159 | */ |
159 | rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_OFF); | 160 | rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_OFF); |
161 | rt2x00led_led_activity(rt2x00dev, false); | ||
160 | rt2x00leds_led_radio(rt2x00dev, false); | 162 | rt2x00leds_led_radio(rt2x00dev, false); |
161 | } | 163 | } |
162 | 164 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00leds.c b/drivers/net/wireless/rt2x00/rt2x00leds.c index 40c1f5c1b805..b362a1cf3f8d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00leds.c +++ b/drivers/net/wireless/rt2x00/rt2x00leds.c | |||
@@ -72,6 +72,21 @@ void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, int rssi) | |||
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | void rt2x00led_led_activity(struct rt2x00_dev *rt2x00dev, bool enabled) | ||
76 | { | ||
77 | struct rt2x00_led *led = &rt2x00dev->led_qual; | ||
78 | unsigned int brightness; | ||
79 | |||
80 | if ((led->type != LED_TYPE_ACTIVITY) || !(led->flags & LED_REGISTERED)) | ||
81 | return; | ||
82 | |||
83 | brightness = enabled ? LED_FULL : LED_OFF; | ||
84 | if (brightness != led->led_dev.brightness) { | ||
85 | led->led_dev.brightness_set(&led->led_dev, brightness); | ||
86 | led->led_dev.brightness = brightness; | ||
87 | } | ||
88 | } | ||
89 | |||
75 | void rt2x00leds_led_assoc(struct rt2x00_dev *rt2x00dev, bool enabled) | 90 | void rt2x00leds_led_assoc(struct rt2x00_dev *rt2x00dev, bool enabled) |
76 | { | 91 | { |
77 | struct rt2x00_led *led = &rt2x00dev->led_assoc; | 92 | struct rt2x00_led *led = &rt2x00dev->led_assoc; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 5be32fffc74c..41ee02cd2825 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h | |||
@@ -185,6 +185,7 @@ static inline void rt2x00rfkill_resume(struct rt2x00_dev *rt2x00dev) | |||
185 | */ | 185 | */ |
186 | #ifdef CONFIG_RT2X00_LIB_LEDS | 186 | #ifdef CONFIG_RT2X00_LIB_LEDS |
187 | void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, int rssi); | 187 | void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, int rssi); |
188 | void rt2x00led_led_activity(struct rt2x00_dev *rt2x00dev, bool enabled); | ||
188 | void rt2x00leds_led_assoc(struct rt2x00_dev *rt2x00dev, bool enabled); | 189 | void rt2x00leds_led_assoc(struct rt2x00_dev *rt2x00dev, bool enabled); |
189 | void rt2x00leds_led_radio(struct rt2x00_dev *rt2x00dev, bool enabled); | 190 | void rt2x00leds_led_radio(struct rt2x00_dev *rt2x00dev, bool enabled); |
190 | void rt2x00leds_register(struct rt2x00_dev *rt2x00dev); | 191 | void rt2x00leds_register(struct rt2x00_dev *rt2x00dev); |
@@ -197,6 +198,11 @@ static inline void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, | |||
197 | { | 198 | { |
198 | } | 199 | } |
199 | 200 | ||
201 | static inline void rt2x00led_led_activity(struct rt2x00_dev *rt2x00dev, | ||
202 | bool enabled) | ||
203 | { | ||
204 | } | ||
205 | |||
200 | static inline void rt2x00leds_led_assoc(struct rt2x00_dev *rt2x00dev, | 206 | static inline void rt2x00leds_led_assoc(struct rt2x00_dev *rt2x00dev, |
201 | bool enabled) | 207 | bool enabled) |
202 | { | 208 | { |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 468a31c8c113..ae12dcdd3c24 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2087,7 +2087,7 @@ static int rt61pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2087 | 2087 | ||
2088 | if (value == LED_MODE_SIGNAL_STRENGTH) { | 2088 | if (value == LED_MODE_SIGNAL_STRENGTH) { |
2089 | rt2x00dev->led_qual.rt2x00dev = rt2x00dev; | 2089 | rt2x00dev->led_qual.rt2x00dev = rt2x00dev; |
2090 | rt2x00dev->led_radio.type = LED_TYPE_QUALITY; | 2090 | rt2x00dev->led_qual.type = LED_TYPE_QUALITY; |
2091 | rt2x00dev->led_qual.led_dev.brightness_set = | 2091 | rt2x00dev->led_qual.led_dev.brightness_set = |
2092 | rt61pci_brightness_set; | 2092 | rt61pci_brightness_set; |
2093 | rt2x00dev->led_qual.led_dev.blink_set = | 2093 | rt2x00dev->led_qual.led_dev.blink_set = |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index a9efe25f1ea7..da19a3a91f4d 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1647,7 +1647,7 @@ static int rt73usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1647 | 1647 | ||
1648 | if (value == LED_MODE_SIGNAL_STRENGTH) { | 1648 | if (value == LED_MODE_SIGNAL_STRENGTH) { |
1649 | rt2x00dev->led_qual.rt2x00dev = rt2x00dev; | 1649 | rt2x00dev->led_qual.rt2x00dev = rt2x00dev; |
1650 | rt2x00dev->led_radio.type = LED_TYPE_QUALITY; | 1650 | rt2x00dev->led_qual.type = LED_TYPE_QUALITY; |
1651 | rt2x00dev->led_qual.led_dev.brightness_set = | 1651 | rt2x00dev->led_qual.led_dev.brightness_set = |
1652 | rt73usb_brightness_set; | 1652 | rt73usb_brightness_set; |
1653 | rt2x00dev->led_qual.led_dev.blink_set = | 1653 | rt2x00dev->led_qual.led_dev.blink_set = |
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index bced3fe1cf8a..5dd23c93497d 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c | |||
@@ -768,41 +768,17 @@ static __u8 *UnStuffData(__u8 * src, __u8 * end, __u8 * dst, | |||
768 | /* General routines for STRIP */ | 768 | /* General routines for STRIP */ |
769 | 769 | ||
770 | /* | 770 | /* |
771 | * get_baud returns the current baud rate, as one of the constants defined in | ||
772 | * termbits.h | ||
773 | * If the user has issued a baud rate override using the 'setserial' command | ||
774 | * and the logical current rate is set to 38.4, then the true baud rate | ||
775 | * currently in effect (57.6 or 115.2) is returned. | ||
776 | */ | ||
777 | static unsigned int get_baud(struct tty_struct *tty) | ||
778 | { | ||
779 | if (!tty || !tty->termios) | ||
780 | return (0); | ||
781 | if ((tty->termios->c_cflag & CBAUD) == B38400 && tty->driver_data) { | ||
782 | struct async_struct *info = | ||
783 | (struct async_struct *) tty->driver_data; | ||
784 | if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) | ||
785 | return (B57600); | ||
786 | if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) | ||
787 | return (B115200); | ||
788 | } | ||
789 | return (tty->termios->c_cflag & CBAUD); | ||
790 | } | ||
791 | |||
792 | /* | ||
793 | * set_baud sets the baud rate to the rate defined by baudcode | 771 | * set_baud sets the baud rate to the rate defined by baudcode |
794 | * Note: The rate B38400 should be avoided, because the user may have | ||
795 | * issued a 'setserial' speed override to map that to a different speed. | ||
796 | * We could achieve a true rate of 38400 if we needed to by cancelling | ||
797 | * any user speed override that is in place, but that might annoy the | ||
798 | * user, so it is simplest to just avoid using 38400. | ||
799 | */ | 772 | */ |
800 | static void set_baud(struct tty_struct *tty, unsigned int baudcode) | 773 | static void set_baud(struct tty_struct *tty, speed_t baudrate) |
801 | { | 774 | { |
802 | struct ktermios old_termios = *(tty->termios); | 775 | struct ktermios old_termios; |
803 | tty->termios->c_cflag &= ~CBAUD; /* Clear the old baud setting */ | 776 | |
804 | tty->termios->c_cflag |= baudcode; /* Set the new baud setting */ | 777 | mutex_lock(&tty->termios_mutex); |
805 | tty->driver->set_termios(tty, &old_termios); | 778 | old_termios =*(tty->termios); |
779 | tty_encode_baud_rate(tty, baudrate, baudrate); | ||
780 | tty->ops->set_termios(tty, &old_termios); | ||
781 | mutex_unlock(&tty->termios_mutex); | ||
806 | } | 782 | } |
807 | 783 | ||
808 | /* | 784 | /* |
@@ -1217,7 +1193,7 @@ static void ResetRadio(struct strip *strip_info) | |||
1217 | strip_info->watchdog_doreset = jiffies + 1 * HZ; | 1193 | strip_info->watchdog_doreset = jiffies + 1 * HZ; |
1218 | 1194 | ||
1219 | /* If the user has selected a baud rate above 38.4 see what magic we have to do */ | 1195 | /* If the user has selected a baud rate above 38.4 see what magic we have to do */ |
1220 | if (strip_info->user_baud > B38400) { | 1196 | if (strip_info->user_baud > 38400) { |
1221 | /* | 1197 | /* |
1222 | * Subtle stuff: Pay attention :-) | 1198 | * Subtle stuff: Pay attention :-) |
1223 | * If the serial port is currently at the user's selected (>38.4) rate, | 1199 | * If the serial port is currently at the user's selected (>38.4) rate, |
@@ -1227,17 +1203,17 @@ static void ResetRadio(struct strip *strip_info) | |||
1227 | * issued the ATS304 command last time through, so this time we restore | 1203 | * issued the ATS304 command last time through, so this time we restore |
1228 | * the user's selected rate and issue the normal starmode reset string. | 1204 | * the user's selected rate and issue the normal starmode reset string. |
1229 | */ | 1205 | */ |
1230 | if (strip_info->user_baud == get_baud(tty)) { | 1206 | if (strip_info->user_baud == tty_get_baud_rate(tty)) { |
1231 | static const char b0[] = "ate0q1s304=57600\r"; | 1207 | static const char b0[] = "ate0q1s304=57600\r"; |
1232 | static const char b1[] = "ate0q1s304=115200\r"; | 1208 | static const char b1[] = "ate0q1s304=115200\r"; |
1233 | static const StringDescriptor baudstring[2] = | 1209 | static const StringDescriptor baudstring[2] = |
1234 | { {b0, sizeof(b0) - 1} | 1210 | { {b0, sizeof(b0) - 1} |
1235 | , {b1, sizeof(b1) - 1} | 1211 | , {b1, sizeof(b1) - 1} |
1236 | }; | 1212 | }; |
1237 | set_baud(tty, B19200); | 1213 | set_baud(tty, 19200); |
1238 | if (strip_info->user_baud == B57600) | 1214 | if (strip_info->user_baud == 57600) |
1239 | s = baudstring[0]; | 1215 | s = baudstring[0]; |
1240 | else if (strip_info->user_baud == B115200) | 1216 | else if (strip_info->user_baud == 115200) |
1241 | s = baudstring[1]; | 1217 | s = baudstring[1]; |
1242 | else | 1218 | else |
1243 | s = baudstring[1]; /* For now */ | 1219 | s = baudstring[1]; /* For now */ |
@@ -1245,7 +1221,7 @@ static void ResetRadio(struct strip *strip_info) | |||
1245 | set_baud(tty, strip_info->user_baud); | 1221 | set_baud(tty, strip_info->user_baud); |
1246 | } | 1222 | } |
1247 | 1223 | ||
1248 | tty->driver->write(tty, s.string, s.length); | 1224 | tty->ops->write(tty, s.string, s.length); |
1249 | #ifdef EXT_COUNTERS | 1225 | #ifdef EXT_COUNTERS |
1250 | strip_info->tx_ebytes += s.length; | 1226 | strip_info->tx_ebytes += s.length; |
1251 | #endif | 1227 | #endif |
@@ -1267,7 +1243,7 @@ static void strip_write_some_more(struct tty_struct *tty) | |||
1267 | 1243 | ||
1268 | if (strip_info->tx_left > 0) { | 1244 | if (strip_info->tx_left > 0) { |
1269 | int num_written = | 1245 | int num_written = |
1270 | tty->driver->write(tty, strip_info->tx_head, | 1246 | tty->ops->write(tty, strip_info->tx_head, |
1271 | strip_info->tx_left); | 1247 | strip_info->tx_left); |
1272 | strip_info->tx_left -= num_written; | 1248 | strip_info->tx_left -= num_written; |
1273 | strip_info->tx_head += num_written; | 1249 | strip_info->tx_head += num_written; |
@@ -2457,7 +2433,7 @@ static int strip_open_low(struct net_device *dev) | |||
2457 | strip_info->working = FALSE; | 2433 | strip_info->working = FALSE; |
2458 | strip_info->firmware_level = NoStructure; | 2434 | strip_info->firmware_level = NoStructure; |
2459 | strip_info->next_command = CompatibilityCommand; | 2435 | strip_info->next_command = CompatibilityCommand; |
2460 | strip_info->user_baud = get_baud(strip_info->tty); | 2436 | strip_info->user_baud = tty_get_baud_rate(strip_info->tty); |
2461 | 2437 | ||
2462 | printk(KERN_INFO "%s: Initializing Radio.\n", | 2438 | printk(KERN_INFO "%s: Initializing Radio.\n", |
2463 | strip_info->dev->name); | 2439 | strip_info->dev->name); |
@@ -2632,6 +2608,13 @@ static int strip_open(struct tty_struct *tty) | |||
2632 | return -EEXIST; | 2608 | return -EEXIST; |
2633 | 2609 | ||
2634 | /* | 2610 | /* |
2611 | * We need a write method. | ||
2612 | */ | ||
2613 | |||
2614 | if (tty->ops->write == NULL) | ||
2615 | return -EOPNOTSUPP; | ||
2616 | |||
2617 | /* | ||
2635 | * OK. Find a free STRIP channel to use. | 2618 | * OK. Find a free STRIP channel to use. |
2636 | */ | 2619 | */ |
2637 | if ((strip_info = strip_alloc()) == NULL) | 2620 | if ((strip_info = strip_alloc()) == NULL) |
@@ -2652,8 +2635,7 @@ static int strip_open(struct tty_struct *tty) | |||
2652 | tty->disc_data = strip_info; | 2635 | tty->disc_data = strip_info; |
2653 | tty->receive_room = 65536; | 2636 | tty->receive_room = 65536; |
2654 | 2637 | ||
2655 | if (tty->driver->flush_buffer) | 2638 | tty_driver_flush_buffer(tty); |
2656 | tty->driver->flush_buffer(tty); | ||
2657 | 2639 | ||
2658 | /* | 2640 | /* |
2659 | * Restore default settings | 2641 | * Restore default settings |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index e34675c2f8fc..5316074f39f0 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -545,11 +545,11 @@ static void handle_rx_packet(struct zd_usb *usb, const u8 *buffer, | |||
545 | * be padded. Unaligned access might also happen if the length_info | 545 | * be padded. Unaligned access might also happen if the length_info |
546 | * structure is not present. | 546 | * structure is not present. |
547 | */ | 547 | */ |
548 | if (get_unaligned(&length_info->tag) == cpu_to_le16(RX_LENGTH_INFO_TAG)) | 548 | if (get_unaligned_le16(&length_info->tag) == RX_LENGTH_INFO_TAG) |
549 | { | 549 | { |
550 | unsigned int l, k, n; | 550 | unsigned int l, k, n; |
551 | for (i = 0, l = 0;; i++) { | 551 | for (i = 0, l = 0;; i++) { |
552 | k = le16_to_cpu(get_unaligned(&length_info->length[i])); | 552 | k = get_unaligned_le16(&length_info->length[i]); |
553 | if (k == 0) | 553 | if (k == 0) |
554 | return; | 554 | return; |
555 | n = l+k; | 555 | n = l+k; |