Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f379fb99 authored by David S. Miller's avatar David S. Miller
Browse files


John W. Linville says:

====================
I present to you another batch of fixes intended for the 3.9 stream...

On the bluetooth bits, Gustavo says:

"I put together 3 fixes intended for 3.9, there are support for two
new devices and a NULL dereference fix in the SCO code."

Amitkumar Karwar fixes a command queueing race in mwifiex.

Bing Zhao provides a pair of mwifiex related to cleaning-up before
a shutdown.

Felix Fietkau provides an ath9k fix for a regression caused by an
earlier calibration fix, and another ath9k fix to avoid race conditions
that unnecessarily lead to chip resets.

Jussi Kivilinna prevents and skbuff leak in rtlwifi.

Stanislaw Gruszka corrects a length paramater for a DMA buffer mapping
operation in iwlegacy.

Please let me know if there are problems!
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 9d73adf4 b9d53190
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -73,9 +73,11 @@ static struct usb_device_id ath3k_table[] = {
	{ USB_DEVICE(0x03F0, 0x311D) },
	{ USB_DEVICE(0x03F0, 0x311D) },


	/* Atheros AR3012 with sflash firmware*/
	/* Atheros AR3012 with sflash firmware*/
	{ USB_DEVICE(0x0CF3, 0x0036) },
	{ USB_DEVICE(0x0CF3, 0x3004) },
	{ USB_DEVICE(0x0CF3, 0x3004) },
	{ USB_DEVICE(0x0CF3, 0x3008) },
	{ USB_DEVICE(0x0CF3, 0x3008) },
	{ USB_DEVICE(0x0CF3, 0x311D) },
	{ USB_DEVICE(0x0CF3, 0x311D) },
	{ USB_DEVICE(0x0CF3, 0x817a) },
	{ USB_DEVICE(0x13d3, 0x3375) },
	{ USB_DEVICE(0x13d3, 0x3375) },
	{ USB_DEVICE(0x04CA, 0x3004) },
	{ USB_DEVICE(0x04CA, 0x3004) },
	{ USB_DEVICE(0x04CA, 0x3005) },
	{ USB_DEVICE(0x04CA, 0x3005) },
@@ -107,9 +109,11 @@ MODULE_DEVICE_TABLE(usb, ath3k_table);
static struct usb_device_id ath3k_blist_tbl[] = {
static struct usb_device_id ath3k_blist_tbl[] = {


	/* Atheros AR3012 with sflash firmware*/
	/* Atheros AR3012 with sflash firmware*/
	{ USB_DEVICE(0x0CF3, 0x0036), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0CF3, 0x817a), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
+2 −0
Original line number Original line Diff line number Diff line
@@ -131,9 +131,11 @@ static struct usb_device_id blacklist_table[] = {
	{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
	{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },


	/* Atheros 3012 with sflash firmware */
	/* Atheros 3012 with sflash firmware */
	{ USB_DEVICE(0x0cf3, 0x0036), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x0cf3, 0x817a), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
	{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
+4 −0
Original line number Original line Diff line number Diff line
@@ -1023,6 +1023,7 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,
					  AR_PHY_AGC_CONTROL_FLTR_CAL   |
					  AR_PHY_AGC_CONTROL_FLTR_CAL   |
					  AR_PHY_AGC_CONTROL_PKDET_CAL;
					  AR_PHY_AGC_CONTROL_PKDET_CAL;


	/* Use chip chainmask only for calibration */
	ar9003_hw_set_chain_masks(ah, ah->caps.rx_chainmask, ah->caps.tx_chainmask);
	ar9003_hw_set_chain_masks(ah, ah->caps.rx_chainmask, ah->caps.tx_chainmask);


	if (rtt) {
	if (rtt) {
@@ -1150,6 +1151,9 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,
		ar9003_hw_rtt_disable(ah);
		ar9003_hw_rtt_disable(ah);
	}
	}


	/* Revert chainmask to runtime parameters */
	ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);

	/* Initialize list pointers */
	/* Initialize list pointers */
	ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;
	ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;


+13 −13
Original line number Original line Diff line number Diff line
@@ -28,9 +28,9 @@ void ath_tx_complete_poll_work(struct work_struct *work)
	int i;
	int i;
	bool needreset = false;
	bool needreset = false;


	for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++)
	for (i = 0; i < IEEE80211_NUM_ACS; i++) {
		if (ATH_TXQ_SETUP(sc, i)) {
		txq = sc->tx.txq_map[i];
			txq = &sc->tx.txq[i];

		ath_txq_lock(sc, txq);
		ath_txq_lock(sc, txq);
		if (txq->axq_depth) {
		if (txq->axq_depth) {
			if (txq->axq_tx_inprogress) {
			if (txq->axq_tx_inprogress) {
+12 −10
Original line number Original line Diff line number Diff line
@@ -475,6 +475,7 @@ il3945_tx_skb(struct il_priv *il,
	dma_addr_t txcmd_phys;
	dma_addr_t txcmd_phys;
	int txq_id = skb_get_queue_mapping(skb);
	int txq_id = skb_get_queue_mapping(skb);
	u16 len, idx, hdr_len;
	u16 len, idx, hdr_len;
	u16 firstlen, secondlen;
	u8 id;
	u8 id;
	u8 unicast;
	u8 unicast;
	u8 sta_id;
	u8 sta_id;
@@ -589,21 +590,22 @@ il3945_tx_skb(struct il_priv *il,
	len =
	len =
	    sizeof(struct il3945_tx_cmd) + sizeof(struct il_cmd_header) +
	    sizeof(struct il3945_tx_cmd) + sizeof(struct il_cmd_header) +
	    hdr_len;
	    hdr_len;
	len = (len + 3) & ~3;
	firstlen = (len + 3) & ~3;


	/* Physical address of this Tx command's header (not MAC header!),
	/* Physical address of this Tx command's header (not MAC header!),
	 * within command buffer array. */
	 * within command buffer array. */
	txcmd_phys =
	txcmd_phys =
	    pci_map_single(il->pci_dev, &out_cmd->hdr, len, PCI_DMA_TODEVICE);
	    pci_map_single(il->pci_dev, &out_cmd->hdr, firstlen,
			   PCI_DMA_TODEVICE);
	if (unlikely(pci_dma_mapping_error(il->pci_dev, txcmd_phys)))
	if (unlikely(pci_dma_mapping_error(il->pci_dev, txcmd_phys)))
		goto drop_unlock;
		goto drop_unlock;


	/* Set up TFD's 2nd entry to point directly to remainder of skb,
	/* Set up TFD's 2nd entry to point directly to remainder of skb,
	 * if any (802.11 null frames have no payload). */
	 * if any (802.11 null frames have no payload). */
	len = skb->len - hdr_len;
	secondlen = skb->len - hdr_len;
	if (len) {
	if (secondlen > 0) {
		phys_addr =
		phys_addr =
		    pci_map_single(il->pci_dev, skb->data + hdr_len, len,
		    pci_map_single(il->pci_dev, skb->data + hdr_len, secondlen,
				   PCI_DMA_TODEVICE);
				   PCI_DMA_TODEVICE);
		if (unlikely(pci_dma_mapping_error(il->pci_dev, phys_addr)))
		if (unlikely(pci_dma_mapping_error(il->pci_dev, phys_addr)))
			goto drop_unlock;
			goto drop_unlock;
@@ -611,12 +613,12 @@ il3945_tx_skb(struct il_priv *il,


	/* Add buffer containing Tx command and MAC(!) header to TFD's
	/* Add buffer containing Tx command and MAC(!) header to TFD's
	 * first entry */
	 * first entry */
	il->ops->txq_attach_buf_to_tfd(il, txq, txcmd_phys, len, 1, 0);
	il->ops->txq_attach_buf_to_tfd(il, txq, txcmd_phys, firstlen, 1, 0);
	dma_unmap_addr_set(out_meta, mapping, txcmd_phys);
	dma_unmap_addr_set(out_meta, mapping, txcmd_phys);
	dma_unmap_len_set(out_meta, len, len);
	dma_unmap_len_set(out_meta, len, firstlen);
	if (len)
	if (secondlen > 0)
		il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, len, 0,
		il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, secondlen, 0,
					       U32_PAD(len));
					       U32_PAD(secondlen));


	if (!ieee80211_has_morefrags(hdr->frame_control)) {
	if (!ieee80211_has_morefrags(hdr->frame_control)) {
		txq->need_update = 1;
		txq->need_update = 1;
Loading