aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-10-30 00:28:59 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-30 00:28:59 -0400
commit0519d83d83ed485b5a1f9222ff69d7d6c9bb8a01 (patch)
tree2e336be8a4bd2e59bcd4b69b00feb77c6672a9cb /drivers
parent38bfd8f5bec496e8e0db8849e01c99a33479418a (diff)
parentb5dd884e682cae6b8c037f9d11f3b623b4cf2011 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2.h9
-rw-r--r--drivers/net/bonding/bond_main.c2
-rw-r--r--drivers/net/cnic.c6
-rw-r--r--drivers/net/qlge/qlge.h1
-rw-r--r--drivers/net/qlge/qlge_main.c78
-rw-r--r--drivers/net/qlge/qlge_mpi.c23
-rw-r--r--drivers/net/sfc/rx.c9
-rw-r--r--drivers/net/usb/dm9601.c4
-rw-r--r--drivers/net/virtio_net.c14
-rw-r--r--drivers/net/wireless/airo.c5
-rw-r--r--drivers/net/wireless/b43/leds.h1
-rw-r--r--drivers/net/wireless/b43/main.c1
-rw-r--r--drivers/net/wireless/b43/rfkill.c3
-rw-r--r--drivers/net/wireless/libertas/if_spi.c10
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c2
15 files changed, 107 insertions, 61 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index 6c7f795d12de..a4d83409f205 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -361,9 +361,12 @@ struct l2_fhdr {
361#define BNX2_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE_VALUE (1<<28) 361#define BNX2_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE_VALUE (1<<28)
362 362
363#define BNX2_L2CTX_HOST_BDIDX 0x00000004 363#define BNX2_L2CTX_HOST_BDIDX 0x00000004
364#define BNX2_L2CTX_STATUSB_NUM_SHIFT 16 364#define BNX2_L2CTX_L5_STATUSB_NUM_SHIFT 16
365#define BNX2_L2CTX_STATUSB_NUM(sb_id) \ 365#define BNX2_L2CTX_L2_STATUSB_NUM_SHIFT 24
366 (((sb_id) > 0) ? (((sb_id) + 7) << BNX2_L2CTX_STATUSB_NUM_SHIFT) : 0) 366#define BNX2_L2CTX_L5_STATUSB_NUM(sb_id) \
367 (((sb_id) > 0) ? (((sb_id) + 7) << BNX2_L2CTX_L5_STATUSB_NUM_SHIFT) : 0)
368#define BNX2_L2CTX_L2_STATUSB_NUM(sb_id) \
369 (((sb_id) > 0) ? (((sb_id) + 7) << BNX2_L2CTX_L2_STATUSB_NUM_SHIFT) : 0)
367#define BNX2_L2CTX_HOST_BSEQ 0x00000008 370#define BNX2_L2CTX_HOST_BSEQ 0x00000008
368#define BNX2_L2CTX_NX_BSEQ 0x0000000c 371#define BNX2_L2CTX_NX_BSEQ 0x0000000c
369#define BNX2_L2CTX_NX_BDHADDR_HI 0x00000010 372#define BNX2_L2CTX_NX_BDHADDR_HI 0x00000010
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 8c5ebfb0680f..db82876ceb28 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -707,7 +707,7 @@ static int bond_check_dev_link(struct bonding *bond,
707 struct net_device *slave_dev, int reporting) 707 struct net_device *slave_dev, int reporting)
708{ 708{
709 const struct net_device_ops *slave_ops = slave_dev->netdev_ops; 709 const struct net_device_ops *slave_ops = slave_dev->netdev_ops;
710 static int (*ioctl)(struct net_device *, struct ifreq *, int); 710 int (*ioctl)(struct net_device *, struct ifreq *, int);
711 struct ifreq ifr; 711 struct ifreq ifr;
712 struct mii_ioctl_data *mii; 712 struct mii_ioctl_data *mii;
713 713
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 333b1d1e7435..cfc6b208631a 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -3560,9 +3560,9 @@ static void cnic_init_bnx2_rx_ring(struct cnic_dev *dev)
3560 cnic_ctx_wr(dev, cid_addr, BNX2_L2CTX_CTX_TYPE, val); 3560 cnic_ctx_wr(dev, cid_addr, BNX2_L2CTX_CTX_TYPE, val);
3561 3561
3562 if (sb_id == 0) 3562 if (sb_id == 0)
3563 val = 2 << BNX2_L2CTX_STATUSB_NUM_SHIFT; 3563 val = 2 << BNX2_L2CTX_L2_STATUSB_NUM_SHIFT;
3564 else 3564 else
3565 val = BNX2_L2CTX_STATUSB_NUM(sb_id); 3565 val = BNX2_L2CTX_L2_STATUSB_NUM(sb_id);
3566 cnic_ctx_wr(dev, cid_addr, BNX2_L2CTX_HOST_BDIDX, val); 3566 cnic_ctx_wr(dev, cid_addr, BNX2_L2CTX_HOST_BDIDX, val);
3567 3567
3568 rxbd = (struct rx_bd *) (cp->l2_ring + BCM_PAGE_SIZE); 3568 rxbd = (struct rx_bd *) (cp->l2_ring + BCM_PAGE_SIZE);
@@ -3719,7 +3719,7 @@ static int cnic_start_bnx2_hw(struct cnic_dev *dev)
3719 cp->int_num = 0; 3719 cp->int_num = 0;
3720 if (ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX) { 3720 if (ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX) {
3721 u32 sb_id = cp->status_blk_num; 3721 u32 sb_id = cp->status_blk_num;
3722 u32 sb = BNX2_L2CTX_STATUSB_NUM(sb_id); 3722 u32 sb = BNX2_L2CTX_L5_STATUSB_NUM(sb_id);
3723 3723
3724 cp->int_num = sb_id << BNX2_PCICFG_INT_ACK_CMD_INT_NUM_SHIFT; 3724 cp->int_num = sb_id << BNX2_PCICFG_INT_ACK_CMD_INT_NUM_SHIFT;
3725 cnic_ctx_wr(dev, cp->kwq_cid_addr, L5_KRNLQ_HOST_QIDX, sb); 3725 cnic_ctx_wr(dev, cp->kwq_cid_addr, L5_KRNLQ_HOST_QIDX, sb);
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index 4b954e13c007..73c7fd2badcd 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -97,6 +97,7 @@ enum {
97 97
98 /* Misc. stuff */ 98 /* Misc. stuff */
99 MAILBOX_COUNT = 16, 99 MAILBOX_COUNT = 16,
100 MAILBOX_TIMEOUT = 5,
100 101
101 PROC_ADDR_RDY = (1 << 31), 102 PROC_ADDR_RDY = (1 << 31),
102 PROC_ADDR_R = (1 << 30), 103 PROC_ADDR_R = (1 << 30),
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index dd0ea0277550..42ad811ec313 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -4101,6 +4101,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
4101 goto err_out; 4101 goto err_out;
4102 } 4102 }
4103 4103
4104 pci_save_state(pdev);
4104 qdev->reg_base = 4105 qdev->reg_base =
4105 ioremap_nocache(pci_resource_start(pdev, 1), 4106 ioremap_nocache(pci_resource_start(pdev, 1),
4106 pci_resource_len(pdev, 1)); 4107 pci_resource_len(pdev, 1));
@@ -4255,6 +4256,33 @@ static void __devexit qlge_remove(struct pci_dev *pdev)
4255 free_netdev(ndev); 4256 free_netdev(ndev);
4256} 4257}
4257 4258
4259/* Clean up resources without touching hardware. */
4260static void ql_eeh_close(struct net_device *ndev)
4261{
4262 int i;
4263 struct ql_adapter *qdev = netdev_priv(ndev);
4264
4265 if (netif_carrier_ok(ndev)) {
4266 netif_carrier_off(ndev);
4267 netif_stop_queue(ndev);
4268 }
4269
4270 if (test_bit(QL_ADAPTER_UP, &qdev->flags))
4271 cancel_delayed_work_sync(&qdev->asic_reset_work);
4272 cancel_delayed_work_sync(&qdev->mpi_reset_work);
4273 cancel_delayed_work_sync(&qdev->mpi_work);
4274 cancel_delayed_work_sync(&qdev->mpi_idc_work);
4275 cancel_delayed_work_sync(&qdev->mpi_port_cfg_work);
4276
4277 for (i = 0; i < qdev->rss_ring_count; i++)
4278 netif_napi_del(&qdev->rx_ring[i].napi);
4279
4280 clear_bit(QL_ADAPTER_UP, &qdev->flags);
4281 ql_tx_ring_clean(qdev);
4282 ql_free_rx_buffers(qdev);
4283 ql_release_adapter_resources(qdev);
4284}
4285
4258/* 4286/*
4259 * This callback is called by the PCI subsystem whenever 4287 * This callback is called by the PCI subsystem whenever
4260 * a PCI bus error is detected. 4288 * a PCI bus error is detected.
@@ -4263,17 +4291,21 @@ static pci_ers_result_t qlge_io_error_detected(struct pci_dev *pdev,
4263 enum pci_channel_state state) 4291 enum pci_channel_state state)
4264{ 4292{
4265 struct net_device *ndev = pci_get_drvdata(pdev); 4293 struct net_device *ndev = pci_get_drvdata(pdev);
4266 struct ql_adapter *qdev = netdev_priv(ndev);
4267
4268 netif_device_detach(ndev);
4269 4294
4270 if (state == pci_channel_io_perm_failure) 4295 switch (state) {
4296 case pci_channel_io_normal:
4297 return PCI_ERS_RESULT_CAN_RECOVER;
4298 case pci_channel_io_frozen:
4299 netif_device_detach(ndev);
4300 if (netif_running(ndev))
4301 ql_eeh_close(ndev);
4302 pci_disable_device(pdev);
4303 return PCI_ERS_RESULT_NEED_RESET;
4304 case pci_channel_io_perm_failure:
4305 dev_err(&pdev->dev,
4306 "%s: pci_channel_io_perm_failure.\n", __func__);
4271 return PCI_ERS_RESULT_DISCONNECT; 4307 return PCI_ERS_RESULT_DISCONNECT;
4272 4308 }
4273 if (netif_running(ndev))
4274 ql_adapter_down(qdev);
4275
4276 pci_disable_device(pdev);
4277 4309
4278 /* Request a slot reset. */ 4310 /* Request a slot reset. */
4279 return PCI_ERS_RESULT_NEED_RESET; 4311 return PCI_ERS_RESULT_NEED_RESET;
@@ -4290,25 +4322,15 @@ static pci_ers_result_t qlge_io_slot_reset(struct pci_dev *pdev)
4290 struct net_device *ndev = pci_get_drvdata(pdev); 4322 struct net_device *ndev = pci_get_drvdata(pdev);
4291 struct ql_adapter *qdev = netdev_priv(ndev); 4323 struct ql_adapter *qdev = netdev_priv(ndev);
4292 4324
4325 pdev->error_state = pci_channel_io_normal;
4326
4327 pci_restore_state(pdev);
4293 if (pci_enable_device(pdev)) { 4328 if (pci_enable_device(pdev)) {
4294 QPRINTK(qdev, IFUP, ERR, 4329 QPRINTK(qdev, IFUP, ERR,
4295 "Cannot re-enable PCI device after reset.\n"); 4330 "Cannot re-enable PCI device after reset.\n");
4296 return PCI_ERS_RESULT_DISCONNECT; 4331 return PCI_ERS_RESULT_DISCONNECT;
4297 } 4332 }
4298
4299 pci_set_master(pdev); 4333 pci_set_master(pdev);
4300
4301 netif_carrier_off(ndev);
4302 ql_adapter_reset(qdev);
4303
4304 /* Make sure the EEPROM is good */
4305 memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len);
4306
4307 if (!is_valid_ether_addr(ndev->perm_addr)) {
4308 QPRINTK(qdev, IFUP, ERR, "After reset, invalid MAC address.\n");
4309 return PCI_ERS_RESULT_DISCONNECT;
4310 }
4311
4312 return PCI_ERS_RESULT_RECOVERED; 4334 return PCI_ERS_RESULT_RECOVERED;
4313} 4335}
4314 4336
@@ -4316,17 +4338,21 @@ static void qlge_io_resume(struct pci_dev *pdev)
4316{ 4338{
4317 struct net_device *ndev = pci_get_drvdata(pdev); 4339 struct net_device *ndev = pci_get_drvdata(pdev);
4318 struct ql_adapter *qdev = netdev_priv(ndev); 4340 struct ql_adapter *qdev = netdev_priv(ndev);
4341 int err = 0;
4319 4342
4320 pci_set_master(pdev); 4343 if (ql_adapter_reset(qdev))
4321 4344 QPRINTK(qdev, DRV, ERR, "reset FAILED!\n");
4322 if (netif_running(ndev)) { 4345 if (netif_running(ndev)) {
4323 if (ql_adapter_up(qdev)) { 4346 err = qlge_open(ndev);
4347 if (err) {
4324 QPRINTK(qdev, IFUP, ERR, 4348 QPRINTK(qdev, IFUP, ERR,
4325 "Device initialization failed after reset.\n"); 4349 "Device initialization failed after reset.\n");
4326 return; 4350 return;
4327 } 4351 }
4352 } else {
4353 QPRINTK(qdev, IFUP, ERR,
4354 "Device was not running prior to EEH.\n");
4328 } 4355 }
4329
4330 netif_device_attach(ndev); 4356 netif_device_attach(ndev);
4331} 4357}
4332 4358
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
index 80b68539c5aa..bac7b86f2129 100644
--- a/drivers/net/qlge/qlge_mpi.c
+++ b/drivers/net/qlge/qlge_mpi.c
@@ -454,7 +454,8 @@ end:
454 */ 454 */
455static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp) 455static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp)
456{ 456{
457 int status, count; 457 int status;
458 unsigned long count;
458 459
459 460
460 /* Begin polled mode for MPI */ 461 /* Begin polled mode for MPI */
@@ -475,9 +476,9 @@ static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp)
475 /* Wait for the command to complete. We loop 476 /* Wait for the command to complete. We loop
476 * here because some AEN might arrive while 477 * here because some AEN might arrive while
477 * we're waiting for the mailbox command to 478 * we're waiting for the mailbox command to
478 * complete. If more than 5 arrive then we can 479 * complete. If more than 5 seconds expire we can
479 * assume something is wrong. */ 480 * assume something is wrong. */
480 count = 5; 481 count = jiffies + HZ * MAILBOX_TIMEOUT;
481 do { 482 do {
482 /* Wait for the interrupt to come in. */ 483 /* Wait for the interrupt to come in. */
483 status = ql_wait_mbx_cmd_cmplt(qdev); 484 status = ql_wait_mbx_cmd_cmplt(qdev);
@@ -501,15 +502,15 @@ static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp)
501 MB_CMD_STS_GOOD) || 502 MB_CMD_STS_GOOD) ||
502 ((mbcp->mbox_out[0] & 0x0000f000) == 503 ((mbcp->mbox_out[0] & 0x0000f000) ==
503 MB_CMD_STS_INTRMDT)) 504 MB_CMD_STS_INTRMDT))
504 break; 505 goto done;
505 } while (--count); 506 } while (time_before(jiffies, count));
506 507
507 if (!count) { 508 QPRINTK(qdev, DRV, ERR,
508 QPRINTK(qdev, DRV, ERR, 509 "Timed out waiting for mailbox complete.\n");
509 "Timed out waiting for mailbox complete.\n"); 510 status = -ETIMEDOUT;
510 status = -ETIMEDOUT; 511 goto end;
511 goto end; 512
512 } 513done:
513 514
514 /* Now we can clear the interrupt condition 515 /* Now we can clear the interrupt condition
515 * and look at our status. 516 * and look at our status.
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c
index ea59ed25b0d8..4b65c626a457 100644
--- a/drivers/net/sfc/rx.c
+++ b/drivers/net/sfc/rx.c
@@ -441,7 +441,8 @@ static void efx_rx_packet__check_len(struct efx_rx_queue *rx_queue,
441 * the appropriate LRO method 441 * the appropriate LRO method
442 */ 442 */
443static void efx_rx_packet_lro(struct efx_channel *channel, 443static void efx_rx_packet_lro(struct efx_channel *channel,
444 struct efx_rx_buffer *rx_buf) 444 struct efx_rx_buffer *rx_buf,
445 bool checksummed)
445{ 446{
446 struct napi_struct *napi = &channel->napi_str; 447 struct napi_struct *napi = &channel->napi_str;
447 448
@@ -463,7 +464,8 @@ static void efx_rx_packet_lro(struct efx_channel *channel,
463 skb->len = rx_buf->len; 464 skb->len = rx_buf->len;
464 skb->data_len = rx_buf->len; 465 skb->data_len = rx_buf->len;
465 skb->truesize += rx_buf->len; 466 skb->truesize += rx_buf->len;
466 skb->ip_summed = CHECKSUM_UNNECESSARY; 467 skb->ip_summed =
468 checksummed ? CHECKSUM_UNNECESSARY : CHECKSUM_NONE;
467 469
468 napi_gro_frags(napi); 470 napi_gro_frags(napi);
469 471
@@ -472,6 +474,7 @@ out:
472 rx_buf->page = NULL; 474 rx_buf->page = NULL;
473 } else { 475 } else {
474 EFX_BUG_ON_PARANOID(!rx_buf->skb); 476 EFX_BUG_ON_PARANOID(!rx_buf->skb);
477 EFX_BUG_ON_PARANOID(!checksummed);
475 478
476 napi_gro_receive(napi, rx_buf->skb); 479 napi_gro_receive(napi, rx_buf->skb);
477 rx_buf->skb = NULL; 480 rx_buf->skb = NULL;
@@ -567,7 +570,7 @@ void __efx_rx_packet(struct efx_channel *channel,
567 } 570 }
568 571
569 if (likely(checksummed || rx_buf->page)) { 572 if (likely(checksummed || rx_buf->page)) {
570 efx_rx_packet_lro(channel, rx_buf); 573 efx_rx_packet_lro(channel, rx_buf, checksummed);
571 goto done; 574 goto done;
572 } 575 }
573 576
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 72470f77f556..a2b30a10064f 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -649,6 +649,10 @@ static const struct usb_device_id products[] = {
649 USB_DEVICE(0x0fe6, 0x8101), /* DM9601 USB to Fast Ethernet Adapter */ 649 USB_DEVICE(0x0fe6, 0x8101), /* DM9601 USB to Fast Ethernet Adapter */
650 .driver_info = (unsigned long)&dm9601_info, 650 .driver_info = (unsigned long)&dm9601_info,
651 }, 651 },
652 {
653 USB_DEVICE(0x0a46, 0x9000), /* DM9000E */
654 .driver_info = (unsigned long)&dm9601_info,
655 },
652 {}, // END 656 {}, // END
653}; 657};
654 658
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index e78486504d3a..95274678fe45 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -514,8 +514,7 @@ again:
514 /* Free up any pending old buffers before queueing new ones. */ 514 /* Free up any pending old buffers before queueing new ones. */
515 free_old_xmit_skbs(vi); 515 free_old_xmit_skbs(vi);
516 516
517 /* Put new one in send queue and do transmit */ 517 /* Try to transmit */
518 __skb_queue_head(&vi->send, skb);
519 capacity = xmit_skb(vi, skb); 518 capacity = xmit_skb(vi, skb);
520 519
521 /* This can happen with OOM and indirect buffers. */ 520 /* This can happen with OOM and indirect buffers. */
@@ -529,8 +528,17 @@ again:
529 } 528 }
530 return NETDEV_TX_BUSY; 529 return NETDEV_TX_BUSY;
531 } 530 }
532
533 vi->svq->vq_ops->kick(vi->svq); 531 vi->svq->vq_ops->kick(vi->svq);
532
533 /*
534 * Put new one in send queue. You'd expect we'd need this before
535 * xmit_skb calls add_buf(), since the callback can be triggered
536 * immediately after that. But since the callback just triggers
537 * another call back here, normal network xmit locking prevents the
538 * race.
539 */
540 __skb_queue_head(&vi->send, skb);
541
534 /* Don't wait up for transmitted skbs to be freed. */ 542 /* Don't wait up for transmitted skbs to be freed. */
535 skb_orphan(skb); 543 skb_orphan(skb);
536 nf_reset(skb); 544 nf_reset(skb);
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index e265ba14054b..4eec87c3be2b 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -4790,9 +4790,8 @@ static int proc_stats_rid_open( struct inode *inode,
4790static int get_dec_u16( char *buffer, int *start, int limit ) { 4790static int get_dec_u16( char *buffer, int *start, int limit ) {
4791 u16 value; 4791 u16 value;
4792 int valid = 0; 4792 int valid = 0;
4793 for( value = 0; buffer[*start] >= '0' && 4793 for (value = 0; *start < limit && buffer[*start] >= '0' &&
4794 buffer[*start] <= '9' && 4794 buffer[*start] <= '9'; (*start)++) {
4795 *start < limit; (*start)++ ) {
4796 valid = 1; 4795 valid = 1;
4797 value *= 10; 4796 value *= 10;
4798 value += buffer[*start] - '0'; 4797 value += buffer[*start] - '0';
diff --git a/drivers/net/wireless/b43/leds.h b/drivers/net/wireless/b43/leds.h
index 4c56187810fc..32b66d53cdac 100644
--- a/drivers/net/wireless/b43/leds.h
+++ b/drivers/net/wireless/b43/leds.h
@@ -1,6 +1,7 @@
1#ifndef B43_LEDS_H_ 1#ifndef B43_LEDS_H_
2#define B43_LEDS_H_ 2#define B43_LEDS_H_
3 3
4struct b43_wl;
4struct b43_wldev; 5struct b43_wldev;
5 6
6#ifdef CONFIG_B43_LEDS 7#ifdef CONFIG_B43_LEDS
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 751017b4c3d3..ed6e96a34743 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4501,7 +4501,6 @@ static void b43_op_stop(struct ieee80211_hw *hw)
4501 4501
4502 cancel_work_sync(&(wl->beacon_update_trigger)); 4502 cancel_work_sync(&(wl->beacon_update_trigger));
4503 4503
4504 wiphy_rfkill_stop_polling(hw->wiphy);
4505 mutex_lock(&wl->mutex); 4504 mutex_lock(&wl->mutex);
4506 if (b43_status(dev) >= B43_STAT_STARTED) { 4505 if (b43_status(dev) >= B43_STAT_STARTED) {
4507 dev = b43_wireless_core_stop(dev); 4506 dev = b43_wireless_core_stop(dev);
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
index 7a3218c5ba7d..ffdce6f3c909 100644
--- a/drivers/net/wireless/b43/rfkill.c
+++ b/drivers/net/wireless/b43/rfkill.c
@@ -33,7 +33,8 @@ bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
33 & B43_MMIO_RADIO_HWENABLED_HI_MASK)) 33 & B43_MMIO_RADIO_HWENABLED_HI_MASK))
34 return 1; 34 return 1;
35 } else { 35 } else {
36 if (b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO) 36 if (b43_status(dev) >= B43_STAT_STARTED &&
37 b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO)
37 & B43_MMIO_RADIO_HWENABLED_LO_MASK) 38 & B43_MMIO_RADIO_HWENABLED_LO_MASK)
38 return 1; 39 return 1;
39 } 40 }
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index 06df2e174b50..30d9d0ea28eb 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -134,7 +134,7 @@ static void spu_transaction_finish(struct if_spi_card *card)
134static int spu_write(struct if_spi_card *card, u16 reg, const u8 *buf, int len) 134static int spu_write(struct if_spi_card *card, u16 reg, const u8 *buf, int len)
135{ 135{
136 int err = 0; 136 int err = 0;
137 u16 reg_out = cpu_to_le16(reg | IF_SPI_WRITE_OPERATION_MASK); 137 __le16 reg_out = cpu_to_le16(reg | IF_SPI_WRITE_OPERATION_MASK);
138 struct spi_message m; 138 struct spi_message m;
139 struct spi_transfer reg_trans; 139 struct spi_transfer reg_trans;
140 struct spi_transfer data_trans; 140 struct spi_transfer data_trans;
@@ -166,7 +166,7 @@ static int spu_write(struct if_spi_card *card, u16 reg, const u8 *buf, int len)
166 166
167static inline int spu_write_u16(struct if_spi_card *card, u16 reg, u16 val) 167static inline int spu_write_u16(struct if_spi_card *card, u16 reg, u16 val)
168{ 168{
169 u16 buff; 169 __le16 buff;
170 170
171 buff = cpu_to_le16(val); 171 buff = cpu_to_le16(val);
172 return spu_write(card, reg, (u8 *)&buff, sizeof(u16)); 172 return spu_write(card, reg, (u8 *)&buff, sizeof(u16));
@@ -188,7 +188,7 @@ static int spu_read(struct if_spi_card *card, u16 reg, u8 *buf, int len)
188{ 188{
189 unsigned int delay; 189 unsigned int delay;
190 int err = 0; 190 int err = 0;
191 u16 reg_out = cpu_to_le16(reg | IF_SPI_READ_OPERATION_MASK); 191 __le16 reg_out = cpu_to_le16(reg | IF_SPI_READ_OPERATION_MASK);
192 struct spi_message m; 192 struct spi_message m;
193 struct spi_transfer reg_trans; 193 struct spi_transfer reg_trans;
194 struct spi_transfer dummy_trans; 194 struct spi_transfer dummy_trans;
@@ -235,7 +235,7 @@ static int spu_read(struct if_spi_card *card, u16 reg, u8 *buf, int len)
235/* Read 16 bits from an SPI register */ 235/* Read 16 bits from an SPI register */
236static inline int spu_read_u16(struct if_spi_card *card, u16 reg, u16 *val) 236static inline int spu_read_u16(struct if_spi_card *card, u16 reg, u16 *val)
237{ 237{
238 u16 buf; 238 __le16 buf;
239 int ret; 239 int ret;
240 240
241 ret = spu_read(card, reg, (u8 *)&buf, sizeof(buf)); 241 ret = spu_read(card, reg, (u8 *)&buf, sizeof(buf));
@@ -248,7 +248,7 @@ static inline int spu_read_u16(struct if_spi_card *card, u16 reg, u16 *val)
248 * The low 16 bits are read first. */ 248 * The low 16 bits are read first. */
249static int spu_read_u32(struct if_spi_card *card, u16 reg, u32 *val) 249static int spu_read_u32(struct if_spi_card *card, u16 reg, u32 *val)
250{ 250{
251 u32 buf; 251 __le32 buf;
252 int err; 252 int err;
253 253
254 err = spu_read(card, reg, (u8 *)&buf, sizeof(buf)); 254 err = spu_read(card, reg, (u8 *)&buf, sizeof(buf));
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index a084077a1c61..9fe770f7d7bb 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1994,7 +1994,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1994 rt2x00_set_field32(&word, TXWI_W1_BW_WIN_SIZE, txdesc->ba_size); 1994 rt2x00_set_field32(&word, TXWI_W1_BW_WIN_SIZE, txdesc->ba_size);
1995 rt2x00_set_field32(&word, TXWI_W1_WIRELESS_CLI_ID, 1995 rt2x00_set_field32(&word, TXWI_W1_WIRELESS_CLI_ID,
1996 test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ? 1996 test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ?
1997 (skbdesc->entry->entry_idx + 1) : 0xff); 1997 txdesc->key_idx : 0xff);
1998 rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, 1998 rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT,
1999 skb->len - txdesc->l2pad); 1999 skb->len - txdesc->l2pad);
2000 rt2x00_set_field32(&word, TXWI_W1_PACKETID, 2000 rt2x00_set_field32(&word, TXWI_W1_PACKETID,