iwlwifi driver 12/22 updates
cover iwlwifi driver 12/22 updates
Hi John,
Patches 7~9 are generic iwlwifi cleanup. Others are iwl3945 merging into iwlagn patches, among which patch 10 should fix a regression reported by Kalle Valo.
Thanks,
-yi
[PATCH 01/10] iwl3945: rearrange 3945 tfd
[PATCH 02/10] iwl3945: adding utils ops
[PATCH 03/10] iwl3945: sync tx queue data structure with iwlagn [PATCH 04/10] iwl3945: remove iwl-3945-led.[ch]
[PATCH 05/10] iwl3945: switch to the iwl-core send_card_state routine [PATCH 06/10] iwl3945: use iwl3945_tx_cmd instead of iwl_tx_cmd [PATCH 07/10] iwlwifi: move sysfs status entry to debugfs [PATCH 08/10] iwlwifi: kill retry_rate sysfs for iwlagn
[PATCH 09/10] iwlwifi: fix warning 'Should it be static' [PATCH 10/10] iwl3945: use rx queue management infrastructure from iwlcore
PATCH 1/10 iwl3945: rearrange 3945 tfd
From: Winkler, Tomas <[email protected]>
This patch moves 3945 TFD structures to iwl-3945-fh.h. It renames them similarly to AGN naming. This patch also eliminates iwl3945_tx_info and fixes endianity issue in iwl3945_tx_skb and iwl3945_enqueue_hcmd caused by ugly casting.
--- drivers/net/wireless/iwlwifi/iwl-3945-fh.h | 12 +++++++- drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 11 ------- drivers/net/wireless/iwlwifi/iwl-3945.c | 19 +++++++------ drivers/net/wireless/iwlwifi/iwl-3945.h | 8 +----- drivers/net/wireless/iwlwifi/iwl-dev.h | 13 +++++---- drivers/net/wireless/iwlwifi/iwl3945-base.c | 40 +++++++++++--------------- 6 files changed, 46 insertions(+), 57 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945-fh.h +11 -1
@@ -172,7 +172,17 @@#define FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000) -#define TFD_QUEUE_SIZE_MAX (256) +struct iwl3945_tfd_tb { +__le32 addr; +__le32 len; +} __attribute__ ((packed)); + +struct iwl3945_tfd { +__le32 control_flags; +struct iwl3945_tfd_tb tbs[4 ]; +u8 __pad[28 ]; +} __attribute__ ((packed)); +#endif /* __iwl_3945_fh_h__ */
drivers/net/wireless/iwlwifi/iwl-3945-hw.h +0 -11
@@ -304,17 +304,6 @@ struct iwl3945_shared {__le32 tx_base_ptr[8 ]; } __attribute__ ((packed)); -struct iwl3945_tfd_frame_data { -__le32 addr; -__le32 len; -} __attribute__ ((packed)); - -struct iwl3945_tfd_frame { -__le32 control_flags; -struct iwl3945_tfd_frame_data pa[4 ]; -u8 reserved[28 ]; -} __attribute__ ((packed)); -static inline u8 iwl3945_hw_get_rate (__le16 rate_n_flags) {return le16_to_cpu (rate_n_flags) &0xFF ;
drivers/net/wireless/iwlwifi/iwl-3945.c +10 -9
@@ -38,6 +38,7 @@#include <asm/unaligned.h> #include <net/mac80211.h> +#include "iwl-fh.h" #include "iwl-3945-fh.h" #include "iwl-commands.h" #include "iwl-3945.h"
@@ -307,7 +308,7 @@ static void iwl3945_tx_queue_reclaim(struct iwl_priv *priv, {struct iwl3945_tx_queue *txq = &priv->txq39[txq_id];struct iwl_queue *q = &txq->q; -struct iwl3945_tx_info *tx_info; +struct iwl_tx_info *tx_info;BUG_ON (txq_id ==IWL_CMD_QUEUE_NUM );
@@ -728,7 +729,7 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr, {int count;u32 pad; -struct iwl3945_tfd_frame *tfd = (struct iwl3945_tfd_frame *)ptr; +struct iwl3945_tfd *tfd = (struct iwl3945_tfd *)ptr; count =TFD_CTL_COUNT_GET (le32_to_cpu (tfd->control_flags)); pad =TFD_CTL_PAD_GET (le32_to_cpu (tfd->control_flags));
@@ -739,8 +740,8 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,return -EINVAL ; } - tfd->pa[count].addr =cpu_to_le32 (addr); - tfd->pa[count].len =cpu_to_le32 (len); + tfd->tbs[count].addr =cpu_to_le32 (addr); + tfd->tbs[count].len =cpu_to_le32 (len); count++;
@@ -757,8 +758,8 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,*/ int iwl3945_hw_txq_free_tfd (struct iwl_priv *priv,struct iwl3945_tx_queue *txq) { -struct iwl3945_tfd_frame *bd_tmp = (struct iwl3945_tfd_frame *)&txq->bd[0 ]; -struct iwl3945_tfd_frame *bd = &bd_tmp[txq->q.read_ptr]; +struct iwl3945_tfd *tfd_tmp = (struct iwl3945_tfd *)&txq->tfds[0 ]; +struct iwl3945_tfd *tfd = &tfd_tmp[txq->q.read_ptr];struct pci_dev *dev = priv->pci_dev;int i;int counter;
@@ -769,7 +770,7 @@ int iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl3945_tx_queue *txq)return 0 ;/* sanity check */ - counter =TFD_CTL_COUNT_GET (le32_to_cpu (bd->control_flags)); + counter =TFD_CTL_COUNT_GET (le32_to_cpu (tfd->control_flags));if (counter >NUM_TFD_CHUNKS ) {IWL_ERR (priv,"Too many chunks: %i\n" , counter);/* @todo issue fatal error, it is quite serious situation */
@@ -779,8 +780,8 @@ int iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl3945_tx_queue *txq)/* unmap chunks if any */ for (i =1 ; i < counter; i++) { -pci_unmap_single (dev,le32_to_cpu (bd->pa[i].addr), -le32_to_cpu (bd->pa[i].len),PCI_DMA_TODEVICE ); +pci_unmap_single (dev,le32_to_cpu (tfd->tbs[i].addr), +le32_to_cpu (tfd->tbs[i].len),PCI_DMA_TODEVICE );if (txq->txb[txq->q.read_ptr].skb[0 ]) {struct sk_buff *skb = txq->txb[txq->q.read_ptr].skb[0 ];if (txq->txb[txq->q.read_ptr].skb[0 ]) {
drivers/net/wireless/iwlwifi/iwl-3945.h +1 -7
@@ -45,6 +45,7 @@ extern struct pci_device_id iwl3945_hw_card_ids[];#include "iwl-csr.h" #include "iwl-prph.h" +#include "iwl-fh.h" #include "iwl-3945-hw.h" #include "iwl-debug.h" #include "iwl-power.h"
@@ -107,13 +108,6 @@ enum iwl3945_antenna {int iwl3945_x2_queue_used (const struct iwl_queue *q,int i); -#define MAX_NUM_OF_TBS (20) - -/* One for each TFD */ -struct iwl3945_tx_info { -struct sk_buff *skb[MAX_NUM_OF_TBS ]; -}; -#include "iwl-agn-rs.h" #define IWL_TX_FIFO_AC0 0
drivers/net/wireless/iwlwifi/iwl-dev.h +7 -6
@@ -36,14 +36,15 @@#include <linux/kernel.h> #include <net/ieee80211_radiotap.h> -#include "iwl-rfkill.h" #include "iwl-eeprom.h" -#include "iwl-4965-hw.h" -#include "iwl-3945-hw.h" -#include "iwl-3945-led.h" #include "iwl-csr.h" #include "iwl-prph.h" +#include "iwl-fh.h" #include "iwl-debug.h" +#include "iwl-rfkill.h" +#include "iwl-4965-hw.h" +#include "iwl-3945-hw.h" +#include "iwl-3945-led.h" #include "iwl-led.h" #include "iwl-power.h" #include "iwl-agn-rs.h"
@@ -239,10 +240,10 @@ struct iwl_channel_info {*/ struct iwl3945_tx_queue {struct iwl_queue q; -struct iwl3945_tfd_frame *bd; +struct iwl3945_tfd *tfds;struct iwl_cmd *cmd;dma_addr_t dma_addr_cmd; -struct iwl3945_tx_info *txb; +struct iwl_tx_info *txb;int need_update;int active; };
drivers/net/wireless/iwlwifi/iwl3945-base.c +17 -23
@@ -48,9 +48,10 @@#define DRV_NAME "iwl3945" +#include "iwl-fh.h" +#include "iwl-3945-fh.h" #include "iwl-commands.h" #include "iwl-3945.h" -#include "iwl-3945-fh.h" #include "iwl-helpers.h" #include "iwl-core.h" #include "iwl-dev.h"
@@ -180,13 +181,13 @@ static int iwl3945_tx_queue_alloc(struct iwl_priv *priv,/* Circular buffer of transmit frame descriptors (TFDs), * shared with device */ - txq->bd =pci_alloc_consistent (dev, -sizeof (txq->bd[0 ]) *TFD_QUEUE_SIZE_MAX , + txq->tfds =pci_alloc_consistent (dev, +sizeof (txq->tfds[0 ]) *TFD_QUEUE_SIZE_MAX , &txq->q.dma_addr); -if (!txq->bd) { +if (!txq->tfds) {IWL_ERR (priv,"pci_alloc_consistent(%zd) failed\n" , -sizeof (txq->bd[0 ]) *TFD_QUEUE_SIZE_MAX ); +sizeof (txq->tfds[0 ]) *TFD_QUEUE_SIZE_MAX ); goto error; } txq->q.id = id;
@@ -278,8 +279,8 @@ void iwl3945_tx_queue_free(struct iwl_priv *priv, struct iwl3945_tx_queue *txq)/* De-alloc circular buffer of TFDs */ if (txq->q.n_bd) -pci_free_consistent (dev,sizeof (struct iwl3945_tfd_frame ) * - txq->q.n_bd, txq->bd, txq->q.dma_addr); +pci_free_consistent (dev,sizeof (struct iwl3945_tfd ) * + txq->q.n_bd, txq->tfds, txq->q.dma_addr);/* De-alloc array of per-TFD driver data */ kfree (txq->txb);
@@ -446,14 +447,12 @@ static int iwl3945_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) {struct iwl3945_tx_queue *txq = &priv->txq39[IWL_CMD_QUEUE_NUM ];struct iwl_queue *q = &txq->q; -struct iwl3945_tfd_frame *tfd; -u32 *control_flags; +struct iwl3945_tfd *tfd;struct iwl_cmd *out_cmd;u32 idx;u16 fix_size = (u16)(cmd->len +sizeof (out_cmd->hdr));dma_addr_t phys_addr;int pad; -u16 count;int ret;unsigned long flags;
@@ -476,11 +475,9 @@ static int iwl3945_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)spin_lock_irqsave (&priv->hcmd_lock, flags); - tfd = &txq->bd[q->write_ptr]; + tfd = &txq->tfds[q->write_ptr];memset (tfd,0 ,sizeof (*tfd)); - control_flags = (u32 *) tfd; - idx =get_cmd_index (q, q->write_ptr, cmd->meta.flags &CMD_SIZE_HUGE ); out_cmd = &txq->cmd[idx];
@@ -502,8 +499,7 @@ static int iwl3945_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)iwl3945_hw_txq_attach_buf_to_tfd (priv, tfd, phys_addr, fix_size); pad =U32_PAD (cmd->len); - count =TFD_CTL_COUNT_GET (*control_flags); - *control_flags =TFD_CTL_COUNT_SET (count) |TFD_CTL_PAD_SET (pad); + tfd->control_flags |=cpu_to_le32 (TFD_CTL_PAD_SET (pad)); IWL_DEBUG_HC("Sending command %s (#%x), seq: 0x%04X, " "%d bytes at %d[%d]:%d\n",
@@ -2235,8 +2231,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) {struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;struct ieee80211_tx_info *info =IEEE80211_SKB_CB (skb); -struct iwl3945_tfd_frame *tfd; -u32 *control_flags; +struct iwl3945_tfd *tfd;int txq_id =skb_get_queue_mapping (skb);struct iwl3945_tx_queue *txq =NULL ;struct iwl_queue *q =NULL ;
@@ -2323,13 +2318,12 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)spin_lock_irqsave (&priv->lock, flags);/* Set up first empty TFD within this queue's circular TFD buffer */ - tfd = &txq->bd[q->write_ptr]; + tfd = &txq->tfds[q->write_ptr];memset (tfd,0 ,sizeof (*tfd)); - control_flags = (u32 *) tfd; idx =get_cmd_index (q, q->write_ptr,0 );/* Set up driver data for this TFD */ -memset (&(txq->txb[q->write_ptr]),0 ,sizeof (struct iwl3945_tx_info )); +memset (&(txq->txb[q->write_ptr]),0 ,sizeof (struct iwl_tx_info )); txq->txb[q->write_ptr].skb[0 ] = skb;/* Init first empty entry in queue's array of Tx/cmd buffers */
@@ -2393,12 +2387,12 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)if (!len)/* If there is no payload, then we use only one Tx buffer */ - *control_flags =TFD_CTL_COUNT_SET (1 ); + tfd->control_flags =cpu_to_le32 (TFD_CTL_COUNT_SET (1 ));else /* Else use 2 buffers. * Tell 3945 about any padding after MAC header */ - *control_flags =TFD_CTL_COUNT_SET (2 ) | -TFD_CTL_PAD_SET (U32_PAD (len)); + tfd->control_flags =cpu_to_le32 (TFD_CTL_COUNT_SET (2 ) | +TFD_CTL_PAD_SET (U32_PAD (len)));/* Total # bytes to be transmitted */ len = (u16 )skb->len;
Signature · 1 line
1.5.3.6
PATCH 2/10 iwl3945: adding utils ops
From: Kolekar, Abhijeet <[email protected]>
The patch implements iwl_hcmd_utils_ops for 3945.
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +18 -0
@@ -2377,6 +2377,19 @@ int iwl3945_hw_tx_queue_init(struct iwl_priv *priv, struct iwl3945_tx_queue *txqreturn 0 ; } +/* +* HCMD utils +*/ +static u16 iwl3945_get_hcmd_size (u8 cmd_id,u16 len) +{ +switch (cmd_id) { +case REPLY_RXON : +return (u16 )sizeof (struct iwl3945_rxon_cmd ); +default : +return len; + } +} +/** * iwl3945_init_hw_rate_table - Initialize the hardware rate fallback table */
@@ -2694,8 +2707,13 @@ static struct iwl_lib_ops iwl3945_lib = { }, }; +static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = { + .get_hcmd_size = iwl3945_get_hcmd_size, +}; +static struct iwl_ops iwl3945_ops = { .lib = &iwl3945_lib, + .utils = &iwl3945_hcmd_utils, };static struct iwl_cfg iwl3945_bg_cfg = {
Signature · 1 line
1.5.3.6
PATCH 3/10 iwl3945: sync tx queue data structure with iwlagn
From: Samuel Ortiz <[email protected]>
We are now using the iwl_tx_queue for iwl3945. To reach that goal, we included the 3945 specific tfd frame structure to iwl_tx_queue. This has no effect on the current iwlagn code.
--- drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 4 - drivers/net/wireless/iwlwifi/iwl-3945.c | 14 ++-- drivers/net/wireless/iwlwifi/iwl-3945.h | 8 +- drivers/net/wireless/iwlwifi/iwl-4965-hw.h | 3 - drivers/net/wireless/iwlwifi/iwl-dev.h | 28 +----- drivers/net/wireless/iwlwifi/iwl-fh.h | 11 +++ drivers/net/wireless/iwlwifi/iwl3945-base.c | 125 ++++++++++++++++---------- 7 files changed, 103 insertions(+), 90 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945-hw.h +0 -4
@@ -240,7 +240,6 @@ struct iwl3945_eeprom {#define TFD_QUEUE_MIN 0#define TFD_QUEUE_MAX 6 -#define TFD_QUEUE_SIZE_MAX (256)#define IWL_NUM_SCAN_RATES (2)
@@ -262,9 +261,6 @@ struct iwl3945_eeprom {#define TFD_CTL_PAD_SET (n) (n << 28)#define TFD_CTL_PAD_GET (ctl) (ctl >> 28) -#define TFD_TX_CMD_SLOTS 256 -#define TFD_CMD_SLOTS 32 -/* * RX related structures and functions */
drivers/net/wireless/iwlwifi/iwl-3945.c +7 -7
@@ -306,7 +306,7 @@ int iwl3945_rs_next_rate(struct iwl_priv *priv, int rate)static void iwl3945_tx_queue_reclaim (struct iwl_priv *priv,int txq_id,int index) { -struct iwl3945_tx_queue *txq = &priv->txq39[txq_id]; +struct iwl_tx_queue *txq = &priv->txq[txq_id];struct iwl_queue *q = &txq->q;struct iwl_tx_info *tx_info;
@@ -337,7 +337,7 @@ static void iwl3945_rx_reply_tx(struct iwl_priv *priv,u16 sequence =le16_to_cpu (pkt->hdr.sequence);int txq_id =SEQ_TO_QUEUE (sequence);int index =SEQ_TO_INDEX (sequence); -struct iwl3945_tx_queue *txq = &priv->txq39[txq_id]; +struct iwl_tx_queue *txq = &priv->txq[txq_id];struct ieee80211_tx_info *info;struct iwl3945_tx_resp *tx_resp = (void *)&pkt->u.raw[0 ];u32 status =le32_to_cpu (tx_resp->status);
@@ -756,9 +756,9 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,* * Does NOT advance any indexes */ -int iwl3945_hw_txq_free_tfd (struct iwl_priv *priv,struct iwl3945_tx_queue *txq) +int iwl3945_hw_txq_free_tfd (struct iwl_priv *priv,struct iwl_tx_queue *txq) { -struct iwl3945_tfd *tfd_tmp = (struct iwl3945_tfd *)&txq->tfds[0 ]; +struct iwl3945_tfd *tfd_tmp = (struct iwl3945_tfd *)&txq->tfds39[0 ];struct iwl3945_tfd *tfd = &tfd_tmp[txq->q.read_ptr];struct pci_dev *dev = priv->pci_dev;int i;
@@ -1062,7 +1062,7 @@ static int iwl3945_txq_ctx_reset(struct iwl_priv *priv)for (txq_id =0 ; txq_id <TFD_QUEUE_MAX ; txq_id++) { slots_num = (txq_id ==IWL_CMD_QUEUE_NUM ) ?TFD_CMD_SLOTS :TFD_TX_CMD_SLOTS ; - rc =iwl3945_tx_queue_init (priv, &priv->txq39[txq_id], slots_num, + rc =iwl3945_tx_queue_init (priv, &priv->txq[txq_id], slots_num, txq_id);if (rc) {IWL_ERR (priv,"Tx %d queue init failed\n" , txq_id);
@@ -1252,7 +1252,7 @@ void iwl3945_hw_txq_ctx_free(struct iwl_priv *priv)/* Tx queues */ for (txq_id =0 ; txq_id <TFD_QUEUE_MAX ; txq_id++) -iwl3945_tx_queue_free (priv, &priv->txq39[txq_id]); +iwl3945_tx_queue_free (priv, &priv->txq[txq_id]); }void iwl3945_hw_txq_ctx_stop (struct iwl_priv *priv)
@@ -2343,7 +2343,7 @@ int iwl3945_hw_rxq_stop(struct iwl_priv *priv)return 0 ; } -int iwl3945_hw_tx_queue_init (struct iwl_priv *priv,struct iwl3945_tx_queue *txq) +int iwl3945_hw_tx_queue_init (struct iwl_priv *priv,struct iwl_tx_queue *txq) {int rc;unsigned long flags;
drivers/net/wireless/iwlwifi/iwl-3945.h +4 -4
@@ -219,9 +219,9 @@ extern void iwl3945_rx_queue_reset(struct iwl_priv *priv,extern int iwl3945_calc_db_from_ratio (int sig_ratio);extern int iwl3945_calc_sig_qual (int rssi_dbm,int noise_dbm);extern int iwl3945_tx_queue_init (struct iwl_priv *priv, -struct iwl3945_tx_queue *txq,int count,u32 id); +struct iwl_tx_queue *txq,int count,u32 id);extern void iwl3945_rx_replenish (void *data); -extern void iwl3945_tx_queue_free (struct iwl_priv *priv,struct iwl3945_tx_queue *txq); +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); extern int __must_check iwl3945_send_cmd(struct iwl_priv *priv,
@@ -270,10 +270,10 @@ extern void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv);extern int iwl3945_hw_nic_reset (struct iwl_priv *priv);extern int iwl3945_hw_txq_attach_buf_to_tfd (struct iwl_priv *priv,void *tfd,dma_addr_t addr,u16 len); -extern int iwl3945_hw_txq_free_tfd (struct iwl_priv *priv,struct iwl3945_tx_queue *txq); +extern int iwl3945_hw_txq_free_tfd (struct iwl_priv *priv,struct iwl_tx_queue *txq);extern int iwl3945_hw_get_temperature (struct iwl_priv *priv);extern int iwl3945_hw_tx_queue_init (struct iwl_priv *priv, -struct iwl3945_tx_queue *txq); +struct iwl_tx_queue *txq);extern unsigned int iwl3945_hw_get_beacon_cmd (struct iwl_priv *priv,struct iwl3945_frame *frame,u8 rate); void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv, struct iwl_cmd *cmd,
drivers/net/wireless/iwlwifi/iwl-4965-hw.h +0 -3
@@ -114,9 +114,6 @@#define RX_QUEUE_MASK 255#define RX_QUEUE_SIZE_LOG 8 -#define TFD_TX_CMD_SLOTS 256 -#define TFD_CMD_SLOTS 32 -/* * RX related structures and functions */
drivers/net/wireless/iwlwifi/iwl-dev.h +4 -24
@@ -134,9 +134,13 @@ struct iwl_tx_info {* A Tx queue consists of circular buffer of BDs (a.k.a. TFDs, transmit frame * descriptors) and required locking structures. */ +#define TFD_TX_CMD_SLOTS 256 +#define TFD_CMD_SLOTS 32 +struct iwl_tx_queue {struct iwl_queue q;struct iwl_tfd *tfds; +struct iwl3945_tfd *tfds39;struct iwl_cmd *cmd[TFD_TX_CMD_SLOTS ];struct iwl_tx_info *txb;u8 need_update;
@@ -226,28 +230,6 @@ struct iwl_channel_info {struct iwl3945_scan_power_info scan_pwr_info[IWL_NUM_SCAN_RATES ]; }; -/** -* struct iwl3945_tx_queue - Tx Queue for DMA -* @q: generic Rx/Tx queue descriptor -* @bd: base of circular buffer of TFDs -* @cmd: array of command/Tx buffers -* @dma_addr_cmd: physical address of cmd/tx buffer array -* @txb: array of per-TFD driver data -* @need_update: indicates need to update read/write index -* -* A Tx queue consists of circular buffer of BDs (a.k.a. TFDs, transmit frame -* descriptors) and required locking structures. -*/ -struct iwl3945_tx_queue { -struct iwl_queue q; -struct iwl3945_tfd *tfds; -struct iwl_cmd *cmd; -dma_addr_t dma_addr_cmd; -struct iwl_tx_info *txb; -int need_update; -int active; -}; -#define IWL_TX_FIFO_AC0 0#define IWL_TX_FIFO_AC1 1#define IWL_TX_FIFO_AC2 2
@@ -1099,8 +1081,6 @@ struct iwl_priv {struct iwl3945_rxon_cmd staging39_rxon;struct iwl3945_rxon_cmd recovery39_rxon; -struct iwl3945_tx_queue txq39[IWL39_MAX_NUM_QUEUES ]; -struct iwl3945_power_mgr power_data_39;struct iwl3945_notif_statistics statistics_39;
drivers/net/wireless/iwlwifi/iwl-fh.h +11 -0
@@ -478,6 +478,17 @@ struct iwl_tfd {__le32 __pad; } __attribute__ ((packed)); +struct iwl3945_tfd_frame_data { +__le32 addr; +__le32 len; +} __attribute__ ((packed)); + +struct iwl3945_tfd_frame { +__le32 control_flags; +struct iwl3945_tfd_frame_data pa[4 ]; +u8 reserved[28 ]; +} __attribute__ ((packed)); +/* Keep Warm Size */ #define IWL_KW_SIZE 0x1000/* 4k */
drivers/net/wireless/iwlwifi/iwl3945-base.c +77 -48
286 lines not on this page · raw message
Signature · 1 line
1.5.3.6
PATCH 4/10 iwl3945: remove iwl-3945-led.[ch]
From: Samuel Ortiz <[email protected]>
We no longer need the 3945 specific LED files and structures. Remove iwl-3945-led.[ch] and use iwl-led.[ch] instead.
--- drivers/net/wireless/iwlwifi/Kconfig | 1 + drivers/net/wireless/iwlwifi/Makefile | 3 - drivers/net/wireless/iwlwifi/iwl-3945-led.c | 409 --------------------------- drivers/net/wireless/iwlwifi/iwl-3945-led.h | 60 ---- drivers/net/wireless/iwlwifi/iwl-3945.c | 10 +- drivers/net/wireless/iwlwifi/iwl-3945.h | 1 - drivers/net/wireless/iwlwifi/iwl-dev.h | 11 +- drivers/net/wireless/iwlwifi/iwl3945-base.c | 7 +- 8 files changed, 5 insertions(+), 497 deletions(-) delete mode 100644 drivers/net/wireless/iwlwifi/iwl-3945-led.c delete mode 100644 drivers/net/wireless/iwlwifi/iwl-3945-led.h
drivers/net/wireless/iwlwifi/Kconfig +1 -0
@@ -146,6 +146,7 @@ config IWL3945_SPECTRUM_MEASUREMENT config IWL3945_LEDS bool "Enable LEDS features in iwl3945 driver" depends on IWL3945 + select IWLWIFI_LEDS ---help--- This option enables LEDS for the iwl3945 driver.
drivers/net/wireless/iwlwifi/Makefile +0 -3
@@ -15,6 +15,3 @@ iwlagn-$(CONFIG_IWL5000) += iwl-5000.o obj-$(CONFIG_IWL3945) += iwl3945.o iwl3945-objs := iwl3945-base.o iwl-3945.o iwl-3945-rs.o -iwl3945-$(CONFIG_IWL3945_LEDS) += iwl-3945-led.o - -
drivers/net/wireless/iwlwifi/iwl-3945-led.c deleted +0 -409
409 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl-3945-led.h deleted +0 -60
60 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl-3945.c +1 -9
@@ -399,7 +399,7 @@ void iwl3945_hw_rx_statistics(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rmemcpy (&priv->statistics_39, pkt->u.raw,sizeof (priv->statistics_39)); -iwl3945_led_background (priv); +iwl_leds_background (priv); priv->last_statistics_time = jiffies; }
@@ -576,9 +576,6 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl_priv *priv, struct ieee80211_rx_status *stats) {struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; -#ifdef CONFIG_IWL3945_LEDS -struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)IWL_RX_DATA (pkt); -#endif struct iwl3945_rx_frame_hdr *rx_hdr =IWL_RX_HDR (pkt);struct iwl3945_rx_frame_end *rx_end =IWL_RX_END (pkt);short len =le16_to_cpu (rx_hdr->len);
@@ -603,11 +600,6 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl_priv *priv,if (iwl3945_mod_params.sw_crypto)iwl3945_set_decrypted_flag (priv, rxb->skb,le32_to_cpu (rx_end->status), stats); - -#ifdef CONFIG_IWL3945_LEDS -if (ieee80211_is_data (hdr->frame_control)) - priv->rxtxpackets += len; -#endif ieee80211_rx_irqsafe (priv->hw, rxb->skb, stats); rxb->skb =NULL ; }
drivers/net/wireless/iwlwifi/iwl-3945.h +0 -1
@@ -50,7 +50,6 @@ extern struct pci_device_id iwl3945_hw_card_ids[];#include "iwl-debug.h" #include "iwl-power.h" #include "iwl-dev.h" -#include "iwl-3945-led.h" /* Highest firmware API version supported */ #define IWL3945_UCODE_API_MAX 2
drivers/net/wireless/iwlwifi/iwl-dev.h +1 -10
@@ -44,7 +44,6 @@#include "iwl-rfkill.h" #include "iwl-4965-hw.h" #include "iwl-3945-hw.h" -#include "iwl-3945-led.h" #include "iwl-led.h" #include "iwl-power.h" #include "iwl-agn-rs.h"
@@ -904,21 +903,13 @@ struct iwl_priv {struct rfkill *rfkill;#endif -#if defined(CONFIG_IWLWIFI_LEDS ) || defined(CONFIG_IWL3945_LEDS ) +#ifdef CONFIG_IWLWIFI_LEDS unsigned long last_blink_time;u8 last_blink_rate;u8 allow_blinking;u64 led_tpt; -#endif - -#ifdef CONFIG_IWLWIFI_LEDS struct iwl_led led[IWL_LED_TRG_MAX ];#endif - -#ifdef CONFIG_IWL3945_LEDS -struct iwl3945_led led39[IWL_LED_TRG_MAX ]; -unsigned int rxtxpackets; -#endif u16 active_rate;u16 active_rate_basic;
drivers/net/wireless/iwlwifi/iwl3945-base.c +2 -5
@@ -2177,9 +2177,6 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv, cmd->cmd.tx.timeout.pm_frame_timeout =cpu_to_le16 (2 ); }else { cmd->cmd.tx.timeout.pm_frame_timeout =0 ; -#ifdef CONFIG_IWL3945_LEDS - priv->rxtxpackets +=le16_to_cpu (cmd->cmd.tx.len); -#endif } cmd->cmd.tx.driver_txop =0 ;
@@ -5386,7 +5383,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv)iwl3945_reg_txpower_periodic (priv); -iwl3945_led_register (priv); +iwl_leds_register (priv);IWL_DEBUG_INFO ("ALIVE processing complete.\n" );set_bit (STATUS_READY , &priv->status);
@@ -5424,7 +5421,7 @@ static void __iwl3945_down(struct iwl_priv *priv)if (!exit_pending)set_bit (STATUS_EXIT_PENDING , &priv->status); -iwl3945_led_unregister (priv); +iwl_leds_unregister (priv);iwl3945_clear_stations_table (priv);/* Unblock any waiting calls */
Signature · 1 line
1.5.3.6
PATCH 5/10 iwl3945: switch to the iwl-core send_card_state routine
From: Samuel Ortiz <[email protected]>
Switch iwl3945 to use iwl-core:send_card_state routine.
--- drivers/net/wireless/iwlwifi/iwl-core.c | 3 +- drivers/net/wireless/iwlwifi/iwl-core.h | 3 ++ drivers/net/wireless/iwlwifi/iwl3945-base.c | 34 +-------------------------- 3 files changed, 6 insertions(+), 34 deletions(-)
drivers/net/wireless/iwlwifi/iwl-core.c +2 -1
@@ -1370,7 +1370,7 @@ EXPORT_SYMBOL(iwl_rf_kill_ct_config);* When in the 'halt' state, the card is shut down and must be fully * restarted to come back on. */ -static int iwl_send_card_state (struct iwl_priv *priv,u32 flags,u8 meta_flag) +int iwl_send_card_state (struct iwl_priv *priv,u32 flags,u8 meta_flag) {struct iwl_host_cmd cmd = { .id =REPLY_CARD_STATE_CMD ,
@@ -1381,6 +1381,7 @@ static int iwl_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag)return iwl_send_cmd (priv, &cmd); } +EXPORT_SYMBOL (iwl_send_card_state);void iwl_radio_kill_sw_disable_radio (struct iwl_priv *priv) {
drivers/net/wireless/iwlwifi/iwl-core.h +3 -0
@@ -342,6 +342,9 @@ int iwl_send_cmd_pdu_async(struct iwl_priv *priv, u8 id, u16 len,int iwl_enqueue_hcmd (struct iwl_priv *priv,struct iwl_host_cmd *cmd); +int iwl_send_card_state (struct iwl_priv *priv,u32 flags, +u8 meta_flag); +/***************************************************** * PCI * *****************************************************/
drivers/net/wireless/iwlwifi/iwl3945-base.c +1 -33
@@ -1078,38 +1078,6 @@ static int iwl3945_send_scan_abort(struct iwl_priv *priv)return rc; } -static int iwl3945_card_state_sync_callback (struct iwl_priv *priv, -struct iwl_cmd *cmd, -struct sk_buff *skb) -{ -return 1 ; -} - -/* -* CARD_STATE_CMD -* -* Use: Sets the device's internal card state to enable, disable, or halt -* -* When in the 'enable' state the card operates as normal. -* When in the 'disable' state, the card enters into a low power mode. -* When in the 'halt' state, the card is shut down and must be fully -* restarted to come back on. -*/ -static int iwl3945_send_card_state (struct iwl_priv *priv,u32 flags,u8 meta_flag) -{ -struct iwl_host_cmd cmd = { - .id =REPLY_CARD_STATE_CMD , - .len =sizeof (u32), - .data = &flags, - .meta.flags = meta_flag, - }; - -if (meta_flag &CMD_ASYNC ) - cmd.meta.u.callback = iwl3945_card_state_sync_callback; - -return iwl3945_send_cmd (priv, &cmd); -} -static int iwl3945_add_sta_sync_callback (struct iwl_priv *priv,struct iwl_cmd *cmd,struct sk_buff *skb) {
@@ -2548,7 +2516,7 @@ static void iwl3945_radio_kill_sw(struct iwl_priv *priv, int disable_radio)iwl_write32 (priv,CSR_UCODE_DRV_GP1_SET ,CSR_UCODE_SW_BIT_RFKILL );spin_unlock_irqrestore (&priv->lock, flags); -iwl3945_send_card_state (priv,CARD_STATE_CMD_DISABLE ,0 ); +iwl_send_card_state (priv,CARD_STATE_CMD_DISABLE ,0 );set_bit (STATUS_RF_KILL_SW , &priv->status); }return ;
Signature · 1 line
1.5.3.6
PATCH 6/10 iwl3945: use iwl3945_tx_cmd instead of iwl_tx_cmd
From: Winkler, Tomas <[email protected]>
The patch replaces iwl_tx_cmd with iwl3945_tx_cmd to complete transitions introduced by commit 77cb4db173d72d1a8c6c89015784a815bfd85221 "iwlwifi: use iwl_cmd instead of iwl3945_cmd"
--- drivers/net/wireless/iwlwifi/iwl3945-base.c | 64 ++++++++++++++------------- 1 files changed, 33 insertions(+), 31 deletions(-)
drivers/net/wireless/iwlwifi/iwl3945-base.c +33 -31
@@ -2047,36 +2047,37 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv, struct sk_buff *skb_frag, int last_frag) { +struct iwl3945_tx_cmd *tx = (struct iwl3945_tx_cmd *)cmd->cmd.payload;struct iwl3945_hw_key *keyinfo = &priv->stations_39[info->control.hw_key->hw_key_idx].keyinfo;switch (keyinfo->alg) {case ALG_CCMP : - cmd->cmd.tx.sec_ctl =TX_CMD_SEC_CCM ; -memcpy (cmd->cmd.tx.key, keyinfo->key, keyinfo->keylen); + tx->sec_ctl =TX_CMD_SEC_CCM ; +memcpy (tx->key, keyinfo->key, keyinfo->keylen);IWL_DEBUG_TX ("tx_cmd with AES hwcrypto\n" );break ;case ALG_TKIP :#if 0 - cmd->cmd.tx.sec_ctl =TX_CMD_SEC_TKIP ; + tx->sec_ctl =TX_CMD_SEC_TKIP ;if (last_frag) -memcpy (cmd->cmd.tx.tkip_mic.byte, skb_frag->tail -8 , +memcpy (tx->tkip_mic.byte, skb_frag->tail -8 ,8 );else -memset (cmd->cmd.tx.tkip_mic.byte,0 ,8 ); +memset (tx->tkip_mic.byte,0 ,8 );#endif break ;case ALG_WEP : - cmd->cmd.tx.sec_ctl =TX_CMD_SEC_WEP | + tx->sec_ctl =TX_CMD_SEC_WEP | (info->control.hw_key->hw_key_idx &TX_CMD_SEC_MSK ) <<TX_CMD_SEC_SHIFT ;if (keyinfo->keylen ==13 ) - cmd->cmd.tx.sec_ctl |=TX_CMD_SEC_KEY128 ; + tx->sec_ctl |=TX_CMD_SEC_KEY128 ; -memcpy (&cmd->cmd.tx.key[3 ], keyinfo->key, keyinfo->keylen); +memcpy (&tx->key[3 ], keyinfo->key, keyinfo->keylen);IWL_DEBUG_TX ("Configuring packet for WEP encryption " "with key %d\n" , info->control.hw_key->hw_key_idx);
@@ -2094,14 +2095,14 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv,static void iwl3945_build_tx_cmd_basic (struct iwl_priv *priv,struct iwl_cmd *cmd,struct ieee80211_tx_info *info, -struct ieee80211_hdr *hdr, -int is_unicast,u8 std_id) +struct ieee80211_hdr *hdr,u8 std_id) { +struct iwl3945_tx_cmd *tx = (struct iwl3945_tx_cmd *)cmd->cmd.payload; +__le32 tx_flags = tx->tx_flags;__le16 fc = hdr->frame_control; -__le32 tx_flags = cmd->cmd.tx.tx_flags;u8 rc_flags = info->control.rates[0 ].flags; - cmd->cmd.tx.stop_time.life_time =TX_CMD_LIFE_TIME_INFINITE ; + tx->stop_time.life_time =TX_CMD_LIFE_TIME_INFINITE ;if (!(info->flags &IEEE80211_TX_CTL_NO_ACK )) { tx_flags |=TX_CMD_FLG_ACK_MSK ;if (ieee80211_is_mgmt (fc))
@@ -2114,13 +2115,13 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv, tx_flags |=TX_CMD_FLG_SEQ_CTL_MSK ; } - cmd->cmd.tx.sta_id = std_id; + tx->sta_id = std_id;if (ieee80211_has_morefrags (fc)) tx_flags |=TX_CMD_FLG_MORE_FRAG_MSK ;if (ieee80211_is_data_qos (fc)) {u8 *qc =ieee80211_get_qos_ctl (hdr); - cmd->cmd.tx.tid_tspec = qc[0 ] &0xf ; + tx->tid_tspec = qc[0 ] &0xf ; tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK ; }else { tx_flags |=TX_CMD_FLG_SEQ_CTL_MSK ;
@@ -2140,16 +2141,16 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv, tx_flags &= ~(TX_CMD_FLG_ANT_SEL_MSK );if (ieee80211_is_mgmt (fc)) {if (ieee80211_is_assoc_req (fc) ||ieee80211_is_reassoc_req (fc)) - cmd->cmd.tx.timeout.pm_frame_timeout =cpu_to_le16 (3 ); + tx->timeout.pm_frame_timeout =cpu_to_le16 (3 );else - cmd->cmd.tx.timeout.pm_frame_timeout =cpu_to_le16 (2 ); + tx->timeout.pm_frame_timeout =cpu_to_le16 (2 ); }else { - cmd->cmd.tx.timeout.pm_frame_timeout =0 ; + tx->timeout.pm_frame_timeout =0 ; } - cmd->cmd.tx.driver_txop =0 ; - cmd->cmd.tx.tx_flags = tx_flags; - cmd->cmd.tx.next_frame_len =0 ; + tx->driver_txop =0 ; + tx->tx_flags = tx_flags; + tx->next_frame_len =0 ; }/**
@@ -2220,12 +2221,13 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;struct ieee80211_tx_info *info =IEEE80211_SKB_CB (skb);struct iwl3945_tfd *tfd; -int txq_id =skb_get_queue_mapping (skb); +struct iwl3945_tx_cmd *tx;struct iwl_tx_queue *txq =NULL ;struct iwl_queue *q =NULL ; +struct iwl_cmd *out_cmd =NULL ;dma_addr_t phys_addr;dma_addr_t txcmd_phys; -struct iwl_cmd *out_cmd =NULL ; +int txq_id =skb_get_queue_mapping (skb);u16 len, idx, len_org, hdr_len;u8 id;u8 unicast;
@@ -2316,8 +2318,9 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)/* Init first empty entry in queue's array of Tx/cmd buffers */ out_cmd = txq->cmd[idx]; + tx = (struct iwl3945_tx_cmd *)out_cmd->cmd.payload;memset (&out_cmd->hdr,0 ,sizeof (out_cmd->hdr)); -memset (&out_cmd->cmd.tx,0 ,sizeof (out_cmd->cmd.tx)); +memset (tx,0 ,sizeof (*tx));/* * Set up the Tx-command (not MAC!) header.
@@ -2330,7 +2333,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) INDEX_TO_SEQ(q->write_ptr)));/* Copy MAC header from skb into command buffer */ -memcpy (out_cmd->cmd.tx.hdr, hdr, hdr_len); +memcpy (tx->hdr, hdr, hdr_len);/* * Use the first empty entry in this queue's command buffer array
@@ -2390,16 +2393,16 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)/* Total # bytes to be transmitted */ len = (u16 )skb->len; - out_cmd->cmd.tx.len =cpu_to_le16 (len); + tx->len =cpu_to_le16 (len);/* TODO need this for burst mode later on */ -iwl3945_build_tx_cmd_basic (priv, out_cmd, info, hdr, unicast, sta_id); +iwl3945_build_tx_cmd_basic (priv, out_cmd, info, hdr, sta_id);/* set is_hcca to 0; it probably will never be implemented */ iwl3945_hw_build_tx_cmd_rate (priv, out_cmd, info, hdr, sta_id,0 ); - out_cmd->cmd.tx.tx_flags &= ~TX_CMD_FLG_ANT_A_MSK ; - out_cmd->cmd.tx.tx_flags &= ~TX_CMD_FLG_ANT_B_MSK ; + tx->tx_flags &= ~TX_CMD_FLG_ANT_A_MSK ; + tx->tx_flags &= ~TX_CMD_FLG_ANT_B_MSK ;if (!ieee80211_has_morefrags (hdr->frame_control)) { txq->need_update =1 ;
@@ -2410,10 +2413,9 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) txq->need_update =0 ; } -iwl_print_hex_dump (priv,IWL_DL_TX , out_cmd->cmd.payload, -sizeof (out_cmd->cmd.tx)); +iwl_print_hex_dump (priv,IWL_DL_TX , tx,sizeof (*tx)); -iwl_print_hex_dump (priv,IWL_DL_TX , (u8 *)out_cmd->cmd.tx.hdr, +iwl_print_hex_dump (priv,IWL_DL_TX , (u8 *)tx->hdr,ieee80211_hdrlen (fc));/* Tell device the write index *just past* this latest filled TFD */
Signature · 1 line
1.5.3.6
PATCH 7/10 iwlwifi: move sysfs status entry to debugfs
From: Winkler, Tomas <[email protected]>
This patch moves priv->status sysfs entry to debugfs. It is for debugging only anyway.
--- drivers/net/wireless/iwlwifi/iwl-agn.c | 11 ----------- drivers/net/wireless/iwlwifi/iwl-debug.h | 1 + drivers/net/wireless/iwlwifi/iwl-debugfs.c | 10 +++++++++- 3 files changed, 10 insertions(+), 12 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn.c +0 -11
@@ -3667,16 +3667,6 @@ static ssize_t show_statistics(struct device *d, static DEVICE_ATTR(statistics, S_IRUGO, show_statistics, NULL); -static ssize_t show_status (struct device *d, -struct device_attribute *attr,char *buf) -{ -struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; -if (!iwl_is_alive (priv)) -return -EAGAIN ; -return sprintf (buf,"0x%08x\n" , (int )priv->status); -} - -static DEVICE_ATTR(status, S_IRUGO, show_status, NULL);/***************************************************************************** *
@@ -3732,7 +3722,6 @@ static struct attribute *iwl_sysfs_entries[] = { &dev_attr_power_level.attr, &dev_attr_retry_rate.attr, &dev_attr_statistics.attr, - &dev_attr_status.attr, &dev_attr_temperature.attr, &dev_attr_tx_power.attr, #ifdef CONFIG_IWLWIFI_DEBUG
drivers/net/wireless/iwlwifi/iwl-debug.h +1 -0
@@ -72,6 +72,7 @@ struct iwl_debugfs {struct dentry *file_tx_statistics;struct dentry *file_log_event;struct dentry *file_channels; +struct dentry *file_status; } dbgfs_data_files;struct dir_rf_files {struct dentry *file_disable_sensitivity;
drivers/net/wireless/iwlwifi/iwl-debugfs.c +9 -1
@@ -63,6 +63,14 @@ goto err; \ } while (0) +#define DEBUGFS_ADD_X32 (name, parent, ptr) do { \ + dbgfs->dbgfs_##parent##_files.file_##name = \ + debugfs_create_x32(#name, 0444, dbgfs->dir_##parent, ptr); \ + if (IS_ERR(dbgfs->dbgfs_##parent##_files.file_##name) \ + || !dbgfs->dbgfs_##parent##_files.file_##name) \ + goto err; \ +} while (0) +#define DEBUGFS_REMOVE (name) do { \ debugfs_remove(name); \ name = NULL; \
@@ -419,7 +427,6 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf,return ret; } -DEBUGFS_READ_WRITE_FILE_OPS (sram);DEBUGFS_WRITE_FILE_OPS (log_event);DEBUGFS_READ_FILE_OPS (eeprom);
@@ -461,6 +468,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)DEBUGFS_ADD_FILE (rx_statistics, data);DEBUGFS_ADD_FILE (tx_statistics, data);DEBUGFS_ADD_FILE (channels, data); +DEBUGFS_ADD_X32 (status, data, (u32 *)&priv->status);DEBUGFS_ADD_BOOL (disable_sensitivity, rf, &priv->disable_sens_cal);DEBUGFS_ADD_BOOL (disable_chain_noise, rf, &priv->disable_chain_noise_cal);
Signature · 1 line
1.5.3.6
PATCH 8/10 iwlwifi: kill retry_rate sysfs for iwlagn
From: Winkler, Tomas <[email protected]>
This patch kills retry_rate in sysfs for iwlagn. It's not used.
--- drivers/net/wireless/iwlwifi/iwl-agn.c | 26 -------------------------- drivers/net/wireless/iwlwifi/iwl-core.c | 1 - 2 files changed, 0 insertions(+), 27 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn.c +0 -26
@@ -3540,31 +3540,6 @@ static ssize_t store_filter_flags(struct device *d, static DEVICE_ATTR(filter_flags, S_IWUSR | S_IRUGO, show_filter_flags, store_filter_flags); -static ssize_t store_retry_rate (struct device *d, -struct device_attribute *attr, -const char *buf,size_t count) -{ -struct iwl_priv *priv =dev_get_drvdata (d); -long val; -int ret =strict_strtol (buf,10 , &val); -if (!ret) -return ret; - - priv->retry_rate = (val >0 ) ? val :1 ; - -return count; -} - -static ssize_t show_retry_rate (struct device *d, -struct device_attribute *attr,char *buf) -{ -struct iwl_priv *priv =dev_get_drvdata (d); -return sprintf (buf,"%d" , priv->retry_rate); -} - -static DEVICE_ATTR(retry_rate, S_IWUSR | S_IRUSR, show_retry_rate, - store_retry_rate); -static ssize_t store_power_level (struct device *d,struct device_attribute *attr,const char *buf,size_t count)
@@ -3720,7 +3695,6 @@ static struct attribute *iwl_sysfs_entries[] = { &dev_attr_flags.attr, &dev_attr_filter_flags.attr, &dev_attr_power_level.attr, - &dev_attr_retry_rate.attr, &dev_attr_statistics.attr, &dev_attr_temperature.attr, &dev_attr_tx_power.attr,
drivers/net/wireless/iwlwifi/iwl-core.c +0 -1
@@ -863,7 +863,6 @@ int iwl_init_drv(struct iwl_priv *priv) {int ret; - priv->retry_rate =1 ; priv->ibss_beacon =NULL ;spin_lock_init (&priv->lock);
Signature · 1 line
1.5.3.6
PATCH 9/10 iwlwifi: fix warning 'Should it be static'
From: Winkler, Tomas <[email protected]>
This patch adds static for functions iwl3945_apm_reset() and iwl3945_init_drv(). It fixes compile warnings.
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 2 +- drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +1 -1
@@ -1315,7 +1315,7 @@ static void iwl3945_apm_stop(struct iwl_priv *priv)spin_unlock_irqrestore (&priv->lock, flags); } -int iwl3945_apm_reset (struct iwl_priv *priv) +static int iwl3945_apm_reset (struct iwl_priv *priv) {int rc;unsigned long flags;
drivers/net/wireless/iwlwifi/iwl3945-base.c +1 -1
@@ -7423,7 +7423,7 @@ static struct ieee80211_ops iwl3945_hw_ops = { .hw_scan = iwl3945_mac_hw_scan }; -int iwl3945_init_drv (struct iwl_priv *priv) +static int iwl3945_init_drv (struct iwl_priv *priv) {int ret;
Signature · 1 line
1.5.3.6
PATCH 10/10 iwl3945: use rx queue management infrastructure from iwlcore
From: Winkler, Tomas <[email protected]>
This patch uses rx queue alloc free and reset function from iwlcore. This should fix the regression reported by Kalle Valo.
--- drivers/net/wireless/iwlwifi/iwl-3945.c | 4 +- drivers/net/wireless/iwlwifi/iwl-3945.h | 3 - drivers/net/wireless/iwlwifi/iwl3945-base.c | 81 +-------------------------- 3 files changed, 3 insertions(+), 85 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +2 -2
@@ -1195,13 +1195,13 @@ int iwl3945_hw_nic_init(struct iwl_priv *priv)/* Allocate the RX queue, or reset if it is already allocated */ if (!rxq->bd) { - rc =iwl3945_rx_queue_alloc (priv); + rc =iwl_rx_queue_alloc (priv);if (rc) {IWL_ERR (priv,"Unable to initialize Rx queue\n" );return -ENOMEM ; } }else -iwl3945_rx_queue_reset (priv, rxq); +iwl_rx_queue_reset (priv, rxq);iwl3945_rx_replenish (priv);
drivers/net/wireless/iwlwifi/iwl-3945.h +0 -3
@@ -212,9 +212,6 @@ extern u8 iwl3945_add_station(struct iwl_priv *priv, const u8 *bssid, int is_ap, u8 flags);extern int iwl3945_power_init_handle (struct iwl_priv *priv);extern int iwl3945_eeprom_init (struct iwl_priv *priv); -extern int iwl3945_rx_queue_alloc (struct iwl_priv *priv); -extern void iwl3945_rx_queue_reset (struct iwl_priv *priv, -struct iwl_rx_queue *rxq);extern int iwl3945_calc_db_from_ratio (int sig_ratio);extern int iwl3945_calc_sig_qual (int rssi_dbm,int noise_dbm); extern int iwl3945_tx_queue_init(struct iwl_priv *priv,
drivers/net/wireless/iwlwifi/iwl3945-base.c +1 -80
99 lines not on this page · raw message
Signature · 1 line
1.5.3.6
Re: [PATCH 01/10] iwl3945: rearrange 3945 tfd
In reply to Zhu YiA few small things I noticed:
Quoted 11 lines · Zhu Yi
From: Winkler, Tomas <[email protected]>
drivers/net/wireless/iwlwifi/iwl-3945-fh.h +1
-1@@ -172,7 +172,17 @@#define FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000) -#define TFD_QUEUE_SIZE_MAX (256) +struct iwl3945_tfd_tb {
drivers/net/wireless/iwlwifi/iwl-3945-fh.h line 185
Quoted 10 lines
drivers/net/wireless/iwlwifi/iwl-3945-fh.h +10
-0+__le32 addr; +__le32 len; +} __attribute__ ((packed)); + +struct iwl3945_tfd { +__le32 control_flags; +struct iwl3945_tfd_tb tbs[4 ]; +u8 __pad[28 ]; +} __attribute__ ((packed)); +
Packed doesn't really buy anything with these two structs, if you still want it, you can also use plain __packed (see compiler-gcc.h)
Quoted 25 lines
drivers/net/wireless/iwlwifi/iwl-3945-fh.h +0
-0static inline u8 iwl3945_hw_get_rate (__le16 rate_n_flags) {return le16_to_cpu (rate_n_flags) &0xFF ;drivers/net/wireless/iwlwifi/iwl-3945.c +2
-1@@ -38,6 +38,7 @@#include <asm/unaligned.h> #include <net/mac80211.h> +#include "iwl-fh.h" #include "iwl-3945-fh.h" #include "iwl-commands.h" #include "iwl-3945.h" @@ -307,7 +308,7 @@ static void iwl3945_tx_queue_reclaim(struct iwl_priv *priv, {struct iwl3945_tx_queue *txq = &priv->txq39[txq_id];struct iwl_queue *q = &txq->q; -struct iwl3945_tx_info *tx_info; +struct iwl_tx_info *tx_info;BUG_ON (txq_id ==IWL_CMD_QUEUE_NUM );
drivers/net/wireless/iwlwifi/iwl-3945.c int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr, · line 732
Quoted 5 lines
drivers/net/wireless/iwlwifi/iwl-3945.c +1
-1@@ -728,7 +729,7 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr, {int count;u32 pad; -struct iwl3945_tfd_frame *tfd = (struct iwl3945_tfd_frame *)ptr; +struct iwl3945_tfd *tfd = (struct iwl3945_tfd *)ptr;
void pointer, no cast needed (although maybe that should get cleaned up.
Cheers,
Harvey
Re: [PATCH 10/10] iwl3945: use rx queue management infrastructure from iwlcore
In reply to Zhu YiQuoted 4 lines · Zhu Yi
From: Winkler, Tomas <[email protected]>
This patch uses rx queue alloc free and reset function from iwlcore. This should fix the regression reported by Kalle Valo.
Yes, ifconfig up works but now iwlist wlan0 scan crashes. I just tested this once due to lack of time.
I hope I get my wifi working before Christmas ;)
[18031.912914] iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26kd [18031.912929] iwl3945: Copyright(c) 2003-2008 Intel Corporation [18031.913084] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 [18031.972027] iwl3945 0000:03:00.0: Tunable channels: 13 802.11bg, 23 802.11a channels [18031.972043] iwl3945 0000:03:00.0: Detected Intel Wireless WiFi Link 3945ABG [18068.633607] iwl3945 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 [18068.634164] iwl3945 0000:03:00.0: firmware: requesting iwlwifi-3945-2.ucode [18068.758728] iwl3945 0000:03:00.0: iwlwifi-3945-2.ucode firmware file req failed: -2 [18068.758746] iwl3945 0000:03:00.0: firmware: requesting iwlwifi-3945-1.ucode [18068.803611] iwl3945 0000:03:00.0: Loaded firmware iwlwifi-3945-1.ucode, which is deprecated. Please use API v2 instead. [18068.803629] iwl3945 0000:03:00.0: Firmware has old API version. Expected 2, got 1. New firmware can be obtained from http://www.intellinuxwireless.org. [18068.803638] iwl3945 0000:03:00.0: loaded firmware version 15.28.1.6 [18068.864814] Registered led device: iwl-phy1:radio [18068.864869] Registered led device: iwl-phy1:assoc [18068.864916] Registered led device: iwl-phy1:RX [18068.864958] Registered led device: iwl-phy1:TX [18068.895330] ADDRCONF(NETDEV_UP): wlan0: link is not ready [18074.727526] BUG: unable to handle kernel NULL pointer dereference at 00000980 [18074.727549] IP: [<f9a3ee5c>] iwl_enqueue_hcmd+0x155/0x3a2 [iwlcore] [18074.727583] *pde = 00000000 [18074.727593] Oops: 0002 [#1] SMP [18074.727605] last sysfs file: /sys/class/firmware/0000:03:00.0/loading [18074.727611] Modules linked in: iwl3945 iwlcore netconsole configfs cdc_acm cdc_ether usbnet mii pl2303 usbserial i915 drm rfcomm l2cap cpufreq_ondemand binfmt_misc ipv6 fuse acpi_cpufreq freq_table loop snd_hda_intel snd_pcm arc4 ecb snd_seq snd_timer snd_seq_device snd mac80211 thinkpad_acpi hci_usb soundcore pcmcia rfkill lib80211 video backlight i2c_i801 psmouse pcspkr cfg80211 bluetooth yenta_socket rsrc_nonstatic pcmcia_core snd_page_alloc rng_core output led_class battery ac nvram ext3 aes_i586 dm_mirror dm_region_hash dm_mod sd_mod ide_pci_generic sdhci ehci_hcd e1000e processor [last unloaded: iwlcore][18074.727916] Pid: 0, comm: swapper Not tainted (2.6.28-rc9-wl #105) 1703Y1F [18074.727924] EIP: 0060:[<f9a3ee5c>] EFLAGS: 00010002 CPU: 0 [18074.727949] EIP is at iwl_enqueue_hcmd+0x155/0x3a2 [iwlcore] [18074.727963] ESI: 00000000 EDI: 00000980 EBP: c03b1d80 ESP: c03b1d40 [18074.727970] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 [18074.727977] Process swapper (pid: 0, ti=c03b0000 task=c037732c task.ti=c03b0000) eebc148c c011a998 c03b1d60 f2689c00 c03b1dac[18074.728049] f9a3a8ef cea6b0fc d55555d5[18074.728084] Call Trace: [18074.728089] [<f9a3a8ef>] ? iwl_send_cmd_async+0x44/0x8a [iwlcore] [18074.728136] [<f9a3ae4c>] ? iwl_send_cmd+0xe/0x1a [iwlcore] [<f9a47656>] ? iwl4965_led_pattern+0x156/0x15e [iwlcore] [18074.728192] [<f9a3a982>] ? iwl_generic_cmd_callback+0x0/0x108 [iwlcore] [18074.728220] [<f9a47917>] ? iwl_leds_background+0x66/0x207 [iwlcore] [18074.728249] [<f9b65ae5>] ? iwl3945_hw_rx_statistics+0x92/0xa9 [iwl3945] [<f9b5a41d>] ? iwl3945_irq_tasklet+0x863/0x1058 [iwl3945] [18074.728297] [<c01373aa>] ? update_wall_time+0x5e1/0x712 [18074.728312] [<c0125cf9>] ? irq_exit+0x38/0x6d [<c010502d>] ? do_IRQ+0x6f/0x86 [<c01039f3>] ? common_interrupt+0x23/0x28 [18074.728390] [<c01e7918>] ? acpi_os_release_lock+0x8/0xa [18074.728435] [<f806bf80>] ? acpi_idle_enter_bm+0xca/0x35a [processor] [18074.728457] [<c0240839>] ? cpuidle_idle_call+0x60/0x93 [<c0101f60>] ? cpu_idle+0x6b/0x87 [<c02935ca>] ? rest_init+0x4e/0x50 f0 2c 86 c0 4d 45 f0 8b 00 8b 38 00 00 01 b9 89 55 d4 ab c0 0c 01 38 00 8b 00 00 iwl_enqueue_hcmd+0x155/0x3a2 [iwlcore][18074.728457] Kernel panic - not syncing: Fatal exception in interrupt [18074.728457] ------------[ cut here ]------------ [18074.728457] WARNING: at kernel/smp.c:333 smp_call_function_mask+0x28/0x17d() [18074.728457] Modules linked in: iwl3945 configfs cdc_acm usbnet usbserial rfcomm l2cap fuse loop arc4 snd_seq mac80211 soundcore pcmcia rfkill i2c_i801 pcspkr yenta_socket snd_page_alloc rng_core led_class ac jbd mbcache sha256_generic dm_crypt dm_log dm_mod sd_mod ata_generic ide_pci_generic ide_core uhci_hcd usbcore fan [18074.728457] Pid: 0, comm: swapper Tainted: G D 2.6.28-rc9-wl #105 [18074.728457] [<c029f7fb>] ? printk+0xf/0x14 [18074.728457] [<c01219a3>] warn_on_slowpath+0x41/0x63 [18074.728457] [<c025a4f2>] ? netpoll_send_udp+0x1e8/0x1f2 [18074.728457] [<f96f8178>] ? write_msg+0xb1/0xb9 [netconsole] [18074.728457] [<c013dd9c>] smp_call_function_mask+0x28/0x17d [18074.728457] [<c01100c7>] ? stop_this_cpu+0x0/0x36 [18074.728457] [<c01100ba>] native_smp_send_stop+0x1b/0x28 [18074.728457] [<c029f759>] panic+0x41/0xd4 [18074.728457] [<c0105703>] die+0x5b/0x63 [18074.728457] [<c0115e45>] do_page_fault+0x549/0x63c [18074.728457] [<c011d49f>] ? default_wake_function+0xb/0xd [18074.728457] [<c01317fe>] ? autoremove_wake_function+0xf/0x33 [18074.728457] [<c0131858>] ? wake_bit_function+0x36/0x43 [18074.728457] [<c01196e4>] ? __wake_up_common+0x35/0x5b [18074.728457] [<c0131788>] ? __wake_up_bit+0x2c/0x32 [18074.728457] [<c014ebe9>] ? mempool_free+0x64/0x6b [18074.728457] [<c014ea00>] ? mempool_free_slab+0xe/0x10 [18074.728457] [<c014ebe9>] ? mempool_free+0x64/0x6b [18074.728457] [<c01158fc>] ? do_page_fault+0x0/0x63c [18074.728457] [<c01400d8>] ? load_module+0x6dd/0x1908 [18074.728457] [<f9a3ee5c>] ? iwl_enqueue_hcmd+0x155/0x3a2 [iwlcore] [18074.728457] [<c011a998>] ? enqueue_task_fair+0x131/0x17a [18074.728457] [<f9a3ae4c>] iwl_send_cmd+0xe/0x1a [iwlcore] [18074.728457] [<f9a47656>] iwl4965_led_pattern+0x156/0x15e [iwlcore] [18074.728457] [<f9a3a982>] ? iwl_generic_cmd_callback+0x0/0x108 [iwlcore] [18074.728457] [<f9a47917>] iwl_leds_background+0x66/0x207 [iwlcore] [18074.728457] [<f9b65ae5>] iwl3945_hw_rx_statistics+0x92/0xa9 [iwl3945] [18074.728457] [<c01373aa>] ? update_wall_time+0x5e1/0x712 [18074.728457] [<c012555d>] tasklet_action+0x61/0xac [18074.728457] [<c0125bf4>] do_softirq+0x35/0x3a [18074.728457] [<c010502d>] do_IRQ+0x6f/0x86 [18074.728457] [<f806c3a8>] ? acpi_idle_enter_simple+0x198/0x205 [processor] [18074.728457] [<c01e7918>] ? acpi_os_release_lock+0x8/0xa [18074.728457] [<f806bf80>] acpi_idle_enter_bm+0xca/0x35a [processor] [18074.728457] [<c024125e>] ? menu_select+0x38/0x86 [18074.728457] [<c0240839>] cpuidle_idle_call+0x60/0x93 [18074.728457] [<c02935ca>] rest_init+0x4e/0x50 [18074.728457] ------------[ cut here ]------------ [18074.728457] WARNING: at kernel/smp.c:220 smp_call_function_single+0x2d/0x9c() [18074.728457] Modules linked in: iwl3945 cdc_acm mii i915 drm binfmt_misc fuse freq_table snd_pcm arc4 ecb snd thinkpad_acpi soundcore pcmcia backlight psmouse bluetooth rsrc_nonstatic pcmcia_core battery button ext3 jbd mbcache cbc dm_region_hash dm_snapshot dm_mod libata ide_pci_generic sdhci_pci sdhci ehci_hcd ide_core usbcore processor fan [18074.728457] Pid: 0, comm: swapper Tainted: G D W 2.6.28-rc9-wl #105 [18074.728457] Call Trace: [18074.728457] [<c029f7fb>] ? printk+0xf/0x14 [18074.728457] [<c01219a3>] warn_on_slowpath+0x41/0x63 [18074.728457] [<c02a1abf>] ? _spin_unlock+0x8/0xa [18074.728457] [<c025a4f2>] ? netpoll_send_udp+0x1e8/0x1f2 [18074.728457] [<f96f8178>] ? write_msg+0xb1/0xb9 [netconsole] [18074.728457] [<c013dd05>] smp_call_function_single+0x2d/0x9c [18074.728457] [<c013ddeb>] smp_call_function_mask+0x77/0x17d [18074.728457] [<c01100c7>] ? stop_this_cpu+0x0/0x36 [18074.728457] [<c01100ba>] native_smp_send_stop+0x1b/0x28 [18074.728457] [<c0105158>] oops_end+0x5d/0x71 [18074.728457] [<c0115e45>] do_page_fault+0x549/0x63c [18074.728457] [<c011d49f>] ? default_wake_function+0xb/0xd [18074.728457] [<c0131858>] ? wake_bit_function+0x36/0x43 [18074.728457] [<c01196e4>] ? __wake_up_common+0x35/0x5b [18074.728457] [<c0119db3>] ? __wake_up+0x31/0x3b [18074.728457] [<c014ea00>] ? mempool_free_slab+0xe/0x10 [18074.728457] [<c01895b2>] ? bio_free+0x31/0x35 [18074.728457] [<c014ea00>] ? mempool_free_slab+0xe/0x10 [18074.728457] [<c01158fc>] ? do_page_fault+0x0/0x63c [18074.728457] [<c01400d8>] ? load_module+0x6dd/0x1908 [18074.728457] [<f9a3ee5c>] ? iwl_enqueue_hcmd+0x155/0x3a2 [iwlcore] [18074.728457] [<c011a998>] ? enqueue_task_fair+0x131/0x17a [18074.728457] [<f9a3a8ef>] iwl_send_cmd_async+0x44/0x8a [iwlcore] [18074.728457] [<f9a47656>] iwl4965_led_pattern+0x156/0x15e [iwlcore] [18074.728457] [<f9a3a982>] ? iwl_generic_cmd_callback+0x0/0x108 [iwlcore] [18074.728457] [<f9a47917>] iwl_leds_background+0x66/0x207 [iwlcore] [18074.728457] [<f9b65ae5>] iwl3945_hw_rx_statistics+0x92/0xa9 [iwl3945] [18074.728457] [<f9b5a41d>] iwl3945_irq_tasklet+0x863/0x1058 [iwl3945] [18074.728457] [<c01373aa>] ? update_wall_time+0x5e1/0x712 [18074.728457] [<c012555d>] tasklet_action+0x61/0xac [18074.728457] [<c0125bf4>] do_softirq+0x35/0x3a [18074.728457] [<c010502d>] do_IRQ+0x6f/0x86 [18074.728457] [<f806c3a8>] ? acpi_idle_enter_simple+0x198/0x205 [processor] [18074.728457] [<c01e7918>] ? acpi_os_release_lock+0x8/0xa [18074.728457] [<f806bf80>] acpi_idle_enter_bm+0xca/0x35a [processor] [18074.728457] [<c0240839>] cpuidle_idle_call+0x60/0x93 [18074.728457] [<c0101f60>] cpu_idle+0x6b/0x87 [18074.728457] ---[ end trace 7a31e9607358195d ]---
Signature · 1 line
Kalle Valo
Re: [PATCH 10/10] iwl3945: use rx queue management infrastructure from iwlcore
Quoted 4 lines · Kalle Valo
Yes, ifconfig up works but now iwlist wlan0 scan crashes. I just tested this once due to lack of time.
I hope I get my wifi working before Christmas ;)
http://marc.info/?l=linux-wireless&m=123000088608330&w=2 should fix the problem. Thanks a lot for your testing.
Thanks,
-yi
Re: [PATCH 10/10] iwl3945: use rx queue management infrastructure from iwlcore
Hiho,
No Xmas-bells ringing here.
I applied the patch-series 01/10 till 10/10 and afterwards I reverted 04_10_iwl3945-remove-iwl-3945-led.[ch].patch with Yi's revert-patch.
On the first sight, everything seems OK.
iwlist, wpa_cli gave the expected values back, but there is no DNS resolved properly, e.g. ping.
This new state is also not usable for me :-).
What does this mean?
[...]
/var/log/syslog:Dec 23 08:18:05 seduxbox kernel: mac80211-phy0: failed to set key (2, ff:ff:ff:ff:ff:ff) to hardware (-22)
[...]
Do I need any mac80211-patches additionally?
The file exists:
$ ls -l /lib/modules/2.6.28-rc9-git3-wl-gcc44/kernel/drivers/crypto/padlock-aes.ko -rw-r--r-- 1 root root 11724 2008-12-23 07:46 /lib/modules/2.6.28-rc9-git3-wl-gcc44/kernel/drivers/crypto/padlock-aes.ko
Kind Regards,
Sedat
----- Investigations -----
[...]/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: EXT4-fs: mounted filesystem with ordered data mode./var/log/syslog-Dec 23 08:18:05 seduxbox kernel: kjournald starting. Commit interval 5 seconds/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: EXT3 FS on sda6, internal journal/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: EXT3-fs: mounted filesystem with ordered data mode./var/log/syslog-Dec 23 08:18:05 seduxbox kernel: iwl3945 0000:10:00.0:
PCI INT A -> GSI 17 (level, low) -> IRQ 17/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: iwl3945 0000:10:00.0:
restoring config space at offset 0x1 (was 0x100002, writing 0x100006) /var/log/syslog-Dec 23 08:18:05 seduxbox kernel: iwl3945 0000:10:00.0:
irq 1274 for MSI/MSI-X/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: iwl3945 0000:10:00.0:
firmware: requesting iwlwifi-3945-2.ucode/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: iwl3945 0000:10:00.0:
loaded firmware version 15.28.2.8/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: Registered led
device: iwl-phy0:radio/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: Registered led
device: iwl-phy0:assoc/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: Registered led
device: iwl-phy0:RX/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: Registered led
device: iwl-phy0:TX/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: NET: Registered protocol family 17/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: NET: Registered protocol family 10/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: lo: Disabled Privacy Extensions /var/log/syslog-Dec 23 08:18:05 seduxbox kernel: ADDRCONF(NETDEV_UP):
wlan0: link is not ready/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: wlan0: authenticate with AP 00:1c:4a:41:62:2e/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: wlan0: authenticated /var/log/syslog-Dec 23 08:18:05 seduxbox kernel: wlan0: associate with AP 00:1c:4a:41:62:2e/var/log/syslog-Dec 23 08:18:05 seduxbox kernel: wlan0: RX AssocResp from 00:1c:4a:41:62:2e (capab=0x411 status=0 aid=1) /var/log/syslog-Dec 23 08:18:05 seduxbox kernel: wlan0: associated /var/log/syslog-Dec 23 08:18:05 seduxbox kernel:ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready /var/log/syslog-Dec 23 08:18:05 seduxbox kernel: padlock: VIA PadLock not detected./var/log/syslog-Dec 23 08:18:05 seduxbox modprobe: WARNING: Error inserting padlock_aes (/lib/modules/2.6.28-rc9-git3-wl-gcc44/kernel/drivers/crypto/padlock-aes.ko):
No such device
/var/log/syslog:Dec 23 08:18:05 seduxbox kernel: mac80211-phy0: failed to set key (2, ff:ff:ff:ff:ff:ff) to hardware (-22)
[...]
Quoted 17 lines · Zhu Yi
Quoted 4 lines · Kalle Valo
Yes, ifconfig up works but now iwlist wlan0 scan crashes. I just tested this once due to lack of time.
I hope I get my wifi working before Christmas ;)
http://marc.info/?l=linux-wireless&m=123000088608330&w=2 should fix the problem. Thanks a lot for your testing.
Thanks,
-yi--
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
Re: [PATCH 10/10] iwl3945: use rx queue management infrastructure from iwlcore
In reply to Zhu YiThe same error-message and as described before no DNS is resolved with latest iwlwifi-2.6.git, also.
I added info about wpa_supplicant version I am using, maybe this is important.
-SD
----- Investigations -----
[...]
/var/log/syslog:Dec 23 10:05:35 seduxbox kernel: mac80211-phy0: failed to set key (1, ff:ff:ff:ff:ff:ff) to hardware (-22)
[...]
# env COLUMNS=180 dpkg -l | grep linux-image | grep 2.6.28-rc9 ii linux-image-2.6.28-rc9-git3-wl-gcc44 2.6.28~rc9+git3+wl~git20081219.30b5741+ Linux kernel binary image for version 2.6.28-rc9-git3-wl-gcc44 ii linux-image-2.6.28-rc9-iwlwifi26-gcc44 2.6.28~rc9+iwlwifi26~git20081223.f4f5c9 Linux kernel binary image for version 2.6.28-rc9-iwlwifi26-gcc44
# env COLUMNS=120 dpkg -l | grep wpa ii wpagui 0.6.6-1+c0.sidux.1 graphical user interface for wpa_supplicant ii wpasupplicant 0.6.6-1+c0.sidux.1 client support for WPA and WPA2 (IEEE 802.11i)
root@seduxbox:~# modprobe -r -v iwl3945 rmmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/drivers/net/wireless/iwlwifi/iwl3945.ko rmmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/drivers/net/wireless/iwlwifi/iwlcore.ko rmmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/net/mac80211/mac80211.ko rmmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/net/rfkill/rfkill.ko rmmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/drivers/leds/led-class.ko rmmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/net/wireless/cfg80211.ko root@seduxbox:~# modprobe -v iwl3945 debug=0x43fff insmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/net/wireless/cfg80211.ko insmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/drivers/leds/led-class.ko insmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/net/rfkill/rfkill.ko insmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/net/mac80211/mac80211.ko insmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/drivers/net/wireless/iwlwifi/iwlcore.ko insmod /lib/modules/2.6.28-rc9-iwlwifi26-gcc44/kernel/drivers/net/wireless/iwlwifi/iwl3945.ko debug=0x43fff
root@seduxbox:~# ping www.heise.de ping: unknown host www.heise.de
root@seduxbox:~# cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
address 192.168.2.103 broadcast 192.168.2.255 dns-nameservers 192.168.2.1 217.237.151.142 217.237.150.188 gateway 192.168.2.1 netmask 255.255.255.0 network 192.168.2.0 wpa-psk <mySecretPassword> wpa-ssid WLAN-001C4A41622E
root@seduxbox:~# lsmod | grep iwl iwl3945 82308 0 iwlcore 85248 1 iwl3945 mac80211 139048 2 iwl3945,iwlcore rfkill 14004 3 iwl3945,iwlcore led_class 7812 2 iwl3945,iwlcore cfg80211 36888 3 iwl3945,iwlcore,mac80211
root@seduxbox:~# tail -f /var/log/messages Dec 23 13:31:06 seduxbox kernel: reserve_memtype failed 0xd8000000-0xdc000000, track write-combining, req write-combining Dec 23 13:31:06 seduxbox kernel: Xorg:5236 conflicting memory types d8000000-dc000000 write-combining<->uncached-minus Dec 23 13:31:06 seduxbox kernel: reserve_memtype failed 0xd8000000-0xdc000000, track write-combining, req write-combining Dec 23 13:31:06 seduxbox kernel: Xorg:5254 freeing invalid memtype d8000000-dc000000 Dec 23 13:31:07 seduxbox kernel: Xorg:5236 conflicting memory types d8000000-dc000000 write-combining<->uncached-minus Dec 23 13:31:07 seduxbox kernel: reserve_memtype failed 0xd8000000-0xdc000000, track write-combining, req write-combining Dec 23 13:31:07 seduxbox kernel: Xorg:5258 freeing invalid memtype d8000000-dc000000 Dec 23 13:31:19 seduxbox kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready Dec 23 13:31:20 seduxbox kernel: padlock: VIA PadLock not detected. Dec 23 13:32:22 seduxbox kernel: iwl3945 0000:10:00.0: PCI INT A disabled Dec 23 13:32:49 seduxbox kernel: cfg80211: Using static regulatory domain info Dec 23 13:32:49 seduxbox kernel: cfg80211: Regulatory domain: US Dec 23 13:32:49 seduxbox kernel: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) Dec 23 13:32:49 seduxbox kernel: (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm) Dec 23 13:32:49 seduxbox kernel: (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) Dec 23 13:32:49 seduxbox kernel: (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) Dec 23 13:32:49 seduxbox kernel: (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) Dec 23 13:32:49 seduxbox kernel: (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) Dec 23 13:32:49 seduxbox kernel: (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm) Dec 23 13:32:49 seduxbox kernel: cfg80211: Calling CRDA for country: US Dec 23 13:32:50 seduxbox kernel: iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26ks Dec 23 13:32:50 seduxbox kernel: iwl3945: Copyright(c) 2003-2008 Intel Corporation Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: Tunable channels: 13 802.11bg, 23 802.11a channels Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: Detected Intel Wireless WiFi Link 3945ABG Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: firmware: requesting iwlwifi-3945-2.ucode Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: loaded firmware version 15.28.2.8 Dec 23 13:32:50 seduxbox kernel: Registered led device: iwl-phy0:radio Dec 23 13:32:50 seduxbox kernel: Registered led device: iwl-phy0:assoc Dec 23 13:32:50 seduxbox kernel: Registered led device: iwl-phy0:RX Dec 23 13:32:50 seduxbox kernel: Registered led device: iwl-phy0:TX Dec 23 13:32:50 seduxbox kernel: ADDRCONF(NETDEV_UP): wlan0: link is not ready Dec 23 13:32:53 seduxbox kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
root@seduxbox:~# tail -50 /var/log/kern.log Dec 23 13:31:07 seduxbox kernel: reserve_memtype failed 0xd8000000-0xdc000000, track write-combining, req write-combining Dec 23 13:31:07 seduxbox kernel: Xorg:5258 freeing invalid memtype d8000000-dc000000 Dec 23 13:31:19 seduxbox kernel: wlan0: authenticate with AP 00:1c:4a:41:62:2e Dec 23 13:31:19 seduxbox kernel: wlan0: authenticated Dec 23 13:31:19 seduxbox kernel: wlan0: associate with AP 00:1c:4a:41:62:2e Dec 23 13:31:19 seduxbox kernel: wlan0: RX AssocResp from 00:1c:4a:41:62:2e (capab=0x411 status=0 aid=1) Dec 23 13:31:19 seduxbox kernel: wlan0: associated Dec 23 13:31:19 seduxbox kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready Dec 23 13:31:20 seduxbox kernel: padlock: VIA PadLock not detected. Dec 23 13:31:20 seduxbox kernel: mac80211-phy0: failed to set key (2, ff:ff:ff:ff:ff:ff) to hardware (-22) Dec 23 13:31:29 seduxbox kernel: wlan0: no IPv6 routers present Dec 23 13:32:22 seduxbox kernel: wlan0: deauthenticating by local choice (reason=3) Dec 23 13:32:22 seduxbox kernel: iwl3945 0000:10:00.0: MAC is in deep sleep! Dec 23 13:32:22 seduxbox kernel: iwl3945 0000:10:00.0: MAC is in deep sleep! Dec 23 13:32:22 seduxbox kernel: iwl3945 0000:10:00.0: MAC is in deep sleep! Dec 23 13:32:22 seduxbox kernel: iwl3945 0000:10:00.0: PCI INT A disabled Dec 23 13:32:49 seduxbox kernel: cfg80211: Using static regulatory domain info Dec 23 13:32:49 seduxbox kernel: cfg80211: Regulatory domain: US Dec 23 13:32:49 seduxbox kernel: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) Dec 23 13:32:49 seduxbox kernel: (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm) Dec 23 13:32:49 seduxbox kernel: (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) Dec 23 13:32:49 seduxbox kernel: (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) Dec 23 13:32:49 seduxbox kernel: (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) Dec 23 13:32:49 seduxbox kernel: (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) Dec 23 13:32:49 seduxbox kernel: (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm) Dec 23 13:32:49 seduxbox kernel: cfg80211: Calling CRDA for country: US Dec 23 13:32:50 seduxbox kernel: iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26ks Dec 23 13:32:50 seduxbox kernel: iwl3945: Copyright(c) 2003-2008 Intel Corporation Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: setting latency timer to 64 Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: Tunable channels: 13 802.11bg, 23 802.11a channels Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: Detected Intel Wireless WiFi Link 3945ABG Dec 23 13:32:50 seduxbox kernel: phy0: Selected rate control algorithm 'iwl-3945-rs' Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: irq 1274 for MSI/MSI-X Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: firmware: requesting iwlwifi-3945-2.ucode Dec 23 13:32:50 seduxbox kernel: iwl3945 0000:10:00.0: loaded firmware version 15.28.2.8 Dec 23 13:32:50 seduxbox kernel: Registered led device: iwl-phy0:radio Dec 23 13:32:50 seduxbox kernel: Registered led device: iwl-phy0:assoc Dec 23 13:32:50 seduxbox kernel: Registered led device: iwl-phy0:RX Dec 23 13:32:50 seduxbox kernel: Registered led device: iwl-phy0:TX Dec 23 13:32:50 seduxbox kernel: ADDRCONF(NETDEV_UP): wlan0: link is not ready Dec 23 13:32:53 seduxbox kernel: wlan0: authenticate with AP 00:1c:4a:41:62:2e Dec 23 13:32:53 seduxbox kernel: wlan0: authenticated Dec 23 13:32:53 seduxbox kernel: wlan0: associate with AP 00:1c:4a:41:62:2e Dec 23 13:32:53 seduxbox kernel: wlan0: RX AssocResp from 00:1c:4a:41:62:2e (capab=0x411 status=0 aid=1) Dec 23 13:32:53 seduxbox kernel: wlan0: associated Dec 23 13:32:53 seduxbox kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready Dec 23 13:32:54 seduxbox kernel: mac80211-phy0: failed to set key (1, ff:ff:ff:ff:ff:ff) to hardware (-22) Dec 23 13:33:03 seduxbox kernel: wlan0: no IPv6 routers present
[EOI] - End Of Investigations
Quoted 17 lines · Zhu Yi
Quoted 4 lines · Kalle Valo
Yes, ifconfig up works but now iwlist wlan0 scan crashes. I just tested this once due to lack of time.
I hope I get my wifi working before Christmas ;)
http://marc.info/?l=linux-wireless&m=123000088608330&w=2 should fix the problem. Thanks a lot for your testing.
Thanks,
-yi--
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
Re: [PATCH 10/10] iwl3945: use rx queue management infrastructure from iwlcore
In reply to Zhu YiQuoted 8 lines · Zhu Yi
Quoted 4 lines · Kalle Valo
Yes, ifconfig up works but now iwlist wlan0 scan crashes. I just tested this once due to lack of time.
I hope I get my wifi working before Christmas ;)
http://marc.info/?l=linux-wireless&m=123000088608330&w=2 should fix the problem. Thanks a lot for your testing.
Yes, that patch fixed it. Now my wifi is working again, thank you for the present! :)
Just to be clear, these are the patches I have applied on top of current wireless-testing:
Revert "iwl3945: remove iwl-3945-led.[ch]"
iwl3945: use rx queue management infrastructure from iwlcore
iwlwifi: fix warning 'Should it be static'
iwlwifi: kill retry_rate sysfs for iwlagn
iwlwifi: move sysfs status entry to debugfs
iwl3945: use iwl3945_tx_cmd instead of iwl_tx_cmd
iwl3945: switch to the iwl-core send_card_state routine
iwl3945: remove iwl-3945-led.[ch]
iwl3945: sync tx queue data structure with iwlagn
iwl3945: adding utils ops
iwl3945: rearrange 3945 tfd
If I spot any regressions, you will hear from me ;)
Signature · 1 line
Kalle Valo
Re: [PATCH 10/10] iwl3945: use rx queue management infrastructure from iwlcore
With wireless-testing master-2008-12-23 (also plus 2.6.28-rc9-git4 patch) everthing OK in iwl3945-world.
Both Linux kernel works fine.
Thank you for the gift.
-Sedat
# env COLUMNS=250 dpkg -l | grep linux-image | grep 2.6.28-rc9 ii linux-image-2.6.28-rc9-git4-wl-gcc44 2.6.28~rc9+git4+wl~git20081223.fd1dae5~dileX+1 Linux kernel binary image for version 2.6.28-rc9-git4-wl-gcc44 ii linux-image-2.6.28-rc9-wl-gcc44 2.6.28~rc9+wl~git20081223.fd1dae5~dileX+1 Linux kernel binary image for version 2.6.28-rc9-wl-gcc44
Quoted 38 lines · Kalle Valo
Quoted 8 lines · Zhu Yi
Quoted 4 lines · Kalle Valo
Yes, ifconfig up works but now iwlist wlan0 scan crashes. I just tested this once due to lack of time.
I hope I get my wifi working before Christmas ;)
http://marc.info/?l=linux-wireless&m=123000088608330&w=2 should fix the problem. Thanks a lot for your testing.
Yes, that patch fixed it. Now my wifi is working again, thank you for the present! :)
Just to be clear, these are the patches I have applied on top of current wireless-testing:
Revert "iwl3945: remove iwl-3945-led.[ch]"
iwl3945: use rx queue management infrastructure from iwlcore
iwlwifi: fix warning 'Should it be static'
iwlwifi: killretry_ratesysfs for iwlagn
iwlwifi: move sysfs status entry to debugfs
iwl3945: useiwl3945_tx_cmdinstead ofiwl_tx_cmd
iwl3945: switch to the iwl-coresend_card_stateroutine
iwl3945: remove iwl-3945-led.[ch]
iwl3945: sync tx queue data structure with iwlagn
iwl3945: adding utils ops
iwl3945: rearrange 3945 tfdIf I spot any regressions, you will hear from me ;)
--
Kalle Valo
--
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