Commit 596a1b746c56f974240c8df6d8e3a026c54266ff

Authored by David S. Miller

Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

Showing 4 changed files Side-by-side Diff

drivers/net/wireless/libertas/if_spi.c
... ... @@ -995,6 +995,7 @@
995 995 spin_unlock_irqrestore(&card->buffer_lock, flags);
996 996 break;
997 997 default:
  998 + kfree(packet);
998 999 netdev_err(priv->dev, "can't transfer buffer of type %d\n",
999 1000 type);
1000 1001 err = -EINVAL;
drivers/net/wireless/rt2x00/rt2800usb.c
... ... @@ -919,6 +919,7 @@
919 919 { USB_DEVICE(0x050d, 0x935b) },
920 920 /* Buffalo */
921 921 { USB_DEVICE(0x0411, 0x00e8) },
  922 + { USB_DEVICE(0x0411, 0x0158) },
922 923 { USB_DEVICE(0x0411, 0x016f) },
923 924 { USB_DEVICE(0x0411, 0x01a2) },
924 925 /* Corega */
drivers/net/wireless/rt2x00/rt2x00.h
... ... @@ -943,6 +943,7 @@
943 943 * Powersaving work
944 944 */
945 945 struct delayed_work autowakeup_work;
  946 + struct work_struct sleep_work;
946 947  
947 948 /*
948 949 * Data queue arrays for RX, TX, Beacon and ATIM.
drivers/net/wireless/rt2x00/rt2x00dev.c
... ... @@ -465,6 +465,23 @@
465 465 return NULL;
466 466 }
467 467  
  468 +static void rt2x00lib_sleep(struct work_struct *work)
  469 +{
  470 + struct rt2x00_dev *rt2x00dev =
  471 + container_of(work, struct rt2x00_dev, sleep_work);
  472 +
  473 + if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
  474 + return;
  475 +
  476 + /*
  477 + * Check again is powersaving is enabled, to prevent races from delayed
  478 + * work execution.
  479 + */
  480 + if (!test_bit(CONFIG_POWERSAVING, &rt2x00dev->flags))
  481 + rt2x00lib_config(rt2x00dev, &rt2x00dev->hw->conf,
  482 + IEEE80211_CONF_CHANGE_PS);
  483 +}
  484 +
468 485 static void rt2x00lib_rxdone_check_ps(struct rt2x00_dev *rt2x00dev,
469 486 struct sk_buff *skb,
470 487 struct rxdone_entry_desc *rxdesc)
... ... @@ -512,8 +529,7 @@
512 529 cam |= (tim_ie->bitmap_ctrl & 0x01);
513 530  
514 531 if (!cam && !test_bit(CONFIG_POWERSAVING, &rt2x00dev->flags))
515   - rt2x00lib_config(rt2x00dev, &rt2x00dev->hw->conf,
516   - IEEE80211_CONF_CHANGE_PS);
  532 + queue_work(rt2x00dev->workqueue, &rt2x00dev->sleep_work);
517 533 }
518 534  
519 535 static int rt2x00lib_rxdone_read_signal(struct rt2x00_dev *rt2x00dev,
... ... @@ -1141,6 +1157,7 @@
1141 1157  
1142 1158 INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled);
1143 1159 INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
  1160 + INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
1144 1161  
1145 1162 /*
1146 1163 * Let the driver probe the device to detect the capabilities.
... ... @@ -1197,6 +1214,7 @@
1197 1214 */
1198 1215 cancel_work_sync(&rt2x00dev->intf_work);
1199 1216 cancel_delayed_work_sync(&rt2x00dev->autowakeup_work);
  1217 + cancel_work_sync(&rt2x00dev->sleep_work);
1200 1218 if (rt2x00_is_usb(rt2x00dev)) {
1201 1219 del_timer_sync(&rt2x00dev->txstatus_timer);
1202 1220 cancel_work_sync(&rt2x00dev->rxdone_work);