Skip to contentSkip to conversation

pull request: wireless-2.6 2008-04-21

PATCH John W. Linville 2 participants 2 messages Apr 21, 2009 – Apr 22, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Dave,

Another quick round of fixes intended for 2.6.30...phew!

iwlwifi: fix EEPROM validation mask to include OTP only devices

This lets iwlagn work with newer iwl6000 devices -- similar to adding a PCI ID.

mac80211: fix alignment calculation bug

This fixes a botched alignment check in ieee80211_deliver_skb -- a one-liner.

mwl8: fix build warning.

Another one-liner, it corrects a build warning due to improper endian conversion of an 8-bit field.

iwl3945: use cancel_delayed_work_sync to cancel rfkill_poll

This prevents iwl3945 from queuing rfkill_poll while removing the module.

mac80211: do not print WARN if config interface

This prevents an annoying and useless warning from showing-up in logs.

iwlwifi: add debugging for TX path

This adds some debugging messages to display sequence numbers for help in tracking-down problems with the iwlwifi drivers. The Intel developers have requested this for their use, and it looks harmless.

iwlwifi: DMA fixes

This one is rather big, but it corrects a number of issues relating to improper use of the DMA API that were uncovered when using iwlwifi with swiotlb. There is a bugzilla entry mentioned in the changelog.

Please let me know if there are problems!

Thanks,

John

---

Individual patches are available here:

http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/

---

The following changes since commit 1bb593801ee32dd9d983dea3cbedf68f71345f78:
Johannes Berg (1):
atmel: fix netdev ops conversion

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master

Jay Sternberg (1):
iwlwifi: fix EEPROM validation mask to include OTP only devices

Johannes Berg (1):
mac80211: fix alignment calculation bug

Rami Rosen (1):
mwl8: fix build warning.

Reinette Chatre (4):
iwl3945: use cancel_delayed_work_sync to cancel rfkill_poll
mac80211: do not print WARN if config interface
iwlwifi: add debugging for TX path
iwlwifi: DMA fixes

 drivers/net/wireless/iwlwifi/iwl-3945.c     |    2 +-
 drivers/net/wireless/iwlwifi/iwl-3945.h     |    1 +
 drivers/net/wireless/iwlwifi/iwl-agn.c      |   11 +--
 drivers/net/wireless/iwlwifi/iwl-csr.h      |    2 +-
 drivers/net/wireless/iwlwifi/iwl-dev.h      |    4 +
 drivers/net/wireless/iwlwifi/iwl-tx.c       |   99 ++++++++++--------
 drivers/net/wireless/iwlwifi/iwl3945-base.c |  148 +++++++++++++++++++--------
 drivers/net/wireless/mwl8k.c                |    3 +-
 net/mac80211/pm.c                           |   15 +++-
 net/mac80211/rx.c                           |    2 +-
 10 files changed, 185 insertions(+), 102 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +1 -1
index 2399328..527525c 100644
@@ -1192,7 +1192,7 @@ int iwl3945_hw_nic_init(struct iwl_priv *priv)
 			return -ENOMEM;
 		}
 	} else
-		iwl_rx_queue_reset(priv, rxq);
+		iwl3945_rx_queue_reset(priv, rxq);
 
 	iwl3945_rx_replenish(priv);
 
drivers/net/wireless/iwlwifi/iwl-3945.h +1 -0
index ab7aaf6..5518884 100644
@@ -215,6 +215,7 @@ extern int iwl3945_calc_sig_qual(int rssi_dbm, int noise_dbm);
 extern int iwl3945_tx_queue_init(struct iwl_priv *priv,
 			     struct iwl_tx_queue *txq, int count, u32 id);
 extern void iwl3945_rx_replenish(void *data);
+extern void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
 extern void iwl3945_tx_queue_free(struct iwl_priv *priv, struct iwl_tx_queue *txq);
 extern int iwl3945_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len,
 			    const void *data);
drivers/net/wireless/iwlwifi/iwl-agn.c +3 -8
index 3889158..1ef4192 100644
@@ -976,11 +976,9 @@ void iwl_rx_handle(struct iwl_priv *priv)
 
 		rxq->queue[i] = NULL;
 
-		dma_sync_single_range_for_cpu(
-				&priv->pci_dev->dev, rxb->real_dma_addr,
-				rxb->aligned_dma_addr - rxb->real_dma_addr,
-				priv->hw_params.rx_buf_size,
-				PCI_DMA_FROMDEVICE);
+		pci_unmap_single(priv->pci_dev, rxb->real_dma_addr,
+				 priv->hw_params.rx_buf_size + 256,
+				 PCI_DMA_FROMDEVICE);
 		pkt = (struct iwl_rx_packet *)rxb->skb->data;
 
 		/* Reclaim a command buffer only if this packet is a response
@@ -1031,9 +1029,6 @@ void iwl_rx_handle(struct iwl_priv *priv)
 			rxb->skb = NULL;
 		}
 
-		pci_unmap_single(priv->pci_dev, rxb->real_dma_addr,
-				 priv->hw_params.rx_buf_size + 256,
-				 PCI_DMA_FROMDEVICE);
 		spin_lock_irqsave(&rxq->lock, flags);
 		list_add_tail(&rxb->list, &priv->rxq.rx_used);
 		spin_unlock_irqrestore(&rxq->lock, flags);
drivers/net/wireless/iwlwifi/iwl-csr.h +1 -1
index 2f12424..6e98314 100644
@@ -223,7 +223,7 @@
 #define CSR_EEPROM_REG_MSK_DATA		(0xFFFF0000)
 
 /* EEPROM GP */
-#define CSR_EEPROM_GP_VALID_MSK		(0x00000006)
+#define CSR_EEPROM_GP_VALID_MSK		(0x00000007)
 #define CSR_EEPROM_GP_BAD_SIGNATURE	(0x00000000)
 #define CSR_EEPROM_GP_IF_OWNER_MSK	(0x00000180)
 
drivers/net/wireless/iwlwifi/iwl-dev.h +4 -0
index ec9a138..cf7f0db 100644
@@ -360,12 +360,16 @@ struct iwl_host_cmd {
 
 /**
  * struct iwl_rx_queue - Rx queue
+ * @bd: driver's pointer to buffer of receive buffer descriptors (rbd)
+ * @dma_addr: bus address of buffer of receive buffer descriptors (rbd)
  * @read: Shared index to newest available Rx buffer
  * @write: Shared index to oldest written Rx packet
  * @free_count: Number of pre-allocated buffers in rx_free
  * @rx_free: list of free SKBs for use
  * @rx_used: List of Rx buffers with no SKB
  * @need_update: flag to indicate we need to update read/write index
+ * @rb_stts: driver's pointer to receive buffer status
+ * @rb_stts_dma: bus address of receive buffer status
  *
  * NOTE:  rx_free and rx_used are used as a FIFO for iwl_rx_mem_buffers
  */
drivers/net/wireless/iwlwifi/iwl-tx.c +56 -43

148 lines not on this page · raw message

drivers/net/wireless/iwlwifi/iwl3945-base.c +104 -44

213 lines not on this page · raw message

drivers/net/wireless/mwl8k.c +1 -2
index b5dbf6d..a9a9704 100644
@@ -893,8 +893,7 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index)
 		rx_desc->next_rx_desc_phys_addr =
 			cpu_to_le32(rxq->rx_desc_dma
 						+ nexti * sizeof(*rx_desc));
-		rx_desc->rx_ctrl =
-			cpu_to_le32(MWL8K_RX_CTRL_OWNED_BY_HOST);
+		rx_desc->rx_ctrl = MWL8K_RX_CTRL_OWNED_BY_HOST;
 	}
 
 	return 0;
net/mac80211/pm.c +13 -2
index 0273023..81985d2 100644
@@ -156,8 +156,19 @@ int __ieee80211_resume(struct ieee80211_hw *hw)
 		case NL80211_IFTYPE_ADHOC:
 		case NL80211_IFTYPE_AP:
 		case NL80211_IFTYPE_MESH_POINT:
-			WARN_ON(ieee80211_if_config(sdata, changed));
-			ieee80211_bss_info_change_notify(sdata, ~0);
+			/*
+			 * Driver's config_interface can fail if rfkill is
+			 * enabled. Accommodate this return code.
+			 * FIXME: When mac80211 has knowledge of rfkill
+			 * state the code below can change back to:
+			 *   WARN(ieee80211_if_config(sdata, changed));
+			 *   ieee80211_bss_info_change_notify(sdata, ~0);
+			 */
+			if (ieee80211_if_config(sdata, changed))
+				printk(KERN_DEBUG "%s: failed to configure interface during resume\n",
+				       sdata->dev->name);
+			else
+				ieee80211_bss_info_change_notify(sdata, ~0);
 			break;
 		case NL80211_IFTYPE_WDS:
 			break;
net/mac80211/rx.c +1 -1
index 5fa7aed..9776f73 100644
@@ -1397,7 +1397,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
 		 * mac80211. That also explains the __skb_push()
 		 * below.
 		 */
-		align = (unsigned long)skb->data & 4;
+		align = (unsigned long)skb->data & 3;
 		if (align) {
 			if (WARN_ON(skb_headroom(skb) < 3)) {
 				dev_kfree_skb(skb);
Signature · 6 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#1 lore raw

From: "John W. Linville" <[email protected]>
Date: Tue, 21 Apr 2009 17:25:03 -0400

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master

Pulled, thanks John.