2010-01-08 18:04:44

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 0/4] iwlwifi updates for 2.6.34

These are a few cleanups targeting 2.6.34. Driver will now return
"unsupported" if receiving IEEE80211_AMPDU_TX_OPERATIONAL from mac80211.
The statistics data structure is updated to use a field previously marked
as "reserved". An obsolete host command is removed. This series also
includes a fix to use correct information when updating byte count table.

Wey-Yi Guy (4):
iwlwifi: add IEEE80211_AMPDU_TX_OPERATIONAL
iwlwifi: ucode statistics data structure update
iwlwifi: remove obsoleted host command
iwlwifi: fix bug in tx byte count table

drivers/net/wireless/iwlwifi/iwl-5000.c | 8 ++++----
drivers/net/wireless/iwlwifi/iwl-agn.c | 3 +++
drivers/net/wireless/iwlwifi/iwl-commands.h | 7 +++----
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 3 +++
drivers/net/wireless/iwlwifi/iwl-hcmd.c | 1 -
5 files changed, 13 insertions(+), 9 deletions(-)

These patches are also available from wireless-next-2.6 branch on
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git

I had some problems compiling wireless-next-2.6 as I ran into the problem
described in http://patchwork.kernel.org/patch/68463/ . I assume that the
"CONFIG_KPROBES=n" relies on patch "[PATCH] x86: compile insn.c and inat.c
only for KPROBES", which is not present in wireless-next-2.6. I am using
gawk. For testing I manually applied this patch and disabled kprobes to be
able to build.

Thank you

Reinette




2010-01-08 18:04:45

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 3/4] iwlwifi: remove obsoleted host command

From: Wey-Yi Guy <[email protected]>

"RADAR_NOTIFICATION" host command is not used and not supported by uCode,
remove it from driver code.

Signed-off-by: Wey-Yi Guy <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-commands.h | 1 -
drivers/net/wireless/iwlwifi/iwl-hcmd.c | 1 -
2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 6bfc63f..3320cce 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -120,7 +120,6 @@ enum {
CALIBRATION_COMPLETE_NOTIFICATION = 0x67,

/* 802.11h related */
- RADAR_NOTIFICATION = 0x70, /* not used */
REPLY_QUIET_CMD = 0x71, /* not used */
REPLY_CHANNEL_SWITCH = 0x72,
CHANNEL_SWITCH_NOTIFICATION = 0x73,
diff --git a/drivers/net/wireless/iwlwifi/iwl-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-hcmd.c
index 30e9ea6..87d684e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-hcmd.c
+++ b/drivers/net/wireless/iwlwifi/iwl-hcmd.c
@@ -58,7 +58,6 @@ const char *get_cmd_string(u8 cmd)
IWL_CMD(COEX_PRIORITY_TABLE_CMD);
IWL_CMD(COEX_MEDIUM_NOTIFICATION);
IWL_CMD(COEX_EVENT_CMD);
- IWL_CMD(RADAR_NOTIFICATION);
IWL_CMD(REPLY_QUIET_CMD);
IWL_CMD(REPLY_CHANNEL_SWITCH);
IWL_CMD(CHANNEL_SWITCH_NOTIFICATION);
--
1.5.6.3


2010-01-08 18:04:45

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 1/4] iwlwifi: add IEEE80211_AMPDU_TX_OPERATIONAL

From: Wey-Yi Guy <[email protected]>

mac80211 do not check the return code now, what if mac80211 does start
using the return code? IEEE80211_AMPDU_TX_OPERATIONAL is a valid action,
just iwlwifi driver do not need to take any action for it; so instead of
return "-EINVAL", it is a good program practice to return "-EOPNOTSUPP"
to make sure mac80211 will not get wrong impression.

Signed-off-by: Wey-Yi Guy <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 771b03c..c780633 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2955,6 +2955,9 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw,
return 0;
else
return ret;
+ case IEEE80211_AMPDU_TX_OPERATIONAL:
+ /* do nothing */
+ return -EOPNOTSUPP;
default:
IWL_DEBUG_HT(priv, "unknown\n");
return -EINVAL;
--
1.5.6.3


2010-01-08 18:04:45

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 4/4] iwlwifi: fix bug in tx byte count table

From: Wey-Yi Guy <[email protected]>

When setting invalid byte count in txq byte count table, read pointer
should be used instead of write pointer.

Reported-by: Guo, Chaohong <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
Signed-off-by: Zhu Yi <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-5000.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index ec6b276..c3f8ec0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -781,7 +781,7 @@ void iwl5000_txq_update_byte_cnt_tbl(struct iwl_priv *priv,

scd_bc_tbl[txq_id].tfd_offset[write_ptr] = bc_ent;

- if (txq->q.write_ptr < TFD_QUEUE_SIZE_BC_DUP)
+ if (write_ptr < TFD_QUEUE_SIZE_BC_DUP)
scd_bc_tbl[txq_id].
tfd_offset[TFD_QUEUE_SIZE_MAX + write_ptr] = bc_ent;
}
@@ -800,12 +800,12 @@ void iwl5000_txq_inval_byte_cnt_tbl(struct iwl_priv *priv,
if (txq_id != IWL_CMD_QUEUE_NUM)
sta_id = txq->cmd[read_ptr]->cmd.tx.sta_id;

- bc_ent = cpu_to_le16(1 | (sta_id << 12));
+ bc_ent = cpu_to_le16(1 | (sta_id << 12));
scd_bc_tbl[txq_id].tfd_offset[read_ptr] = bc_ent;

- if (txq->q.write_ptr < TFD_QUEUE_SIZE_BC_DUP)
+ if (read_ptr < TFD_QUEUE_SIZE_BC_DUP)
scd_bc_tbl[txq_id].
- tfd_offset[TFD_QUEUE_SIZE_MAX + read_ptr] = bc_ent;
+ tfd_offset[TFD_QUEUE_SIZE_MAX + read_ptr] = bc_ent;
}

static int iwl5000_tx_queue_set_q2ratid(struct iwl_priv *priv, u16 ra_tid,
--
1.5.6.3


2010-01-08 18:04:44

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 2/4] iwlwifi: ucode statistics data structure update

From: Wey-Yi Guy <[email protected]>

Update data structure to match latest statistics report from uCode.

Signed-off-by: Wey-Yi Guy <[email protected]>
Signed-off-by: Zhu Yi <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-commands.h | 6 +++---
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 3 +++
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 28f3800..6bfc63f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -2984,7 +2984,7 @@ struct statistics_rx_ht_phy {
__le32 agg_crc32_good;
__le32 agg_mpdu_cnt;
__le32 agg_cnt;
- __le32 reserved2;
+ __le32 unsupport_mcs;
} __attribute__ ((packed));

#define INTERFERENCE_DATA_AVAILABLE cpu_to_le32(1)
@@ -3087,8 +3087,8 @@ struct statistics_div {
} __attribute__ ((packed));

struct statistics_general {
- __le32 temperature;
- __le32 temperature_m;
+ __le32 temperature; /* radio temperature */
+ __le32 temperature_m; /* for 5000 and up, this is radio voltage */
struct statistics_dbg dbg;
__le32 sleep_time;
__le32 slots_out;
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index ee5aed1..510bad9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -1387,6 +1387,9 @@ static ssize_t iwl_dbgfs_ucode_rx_stats_read(struct file *file,
accum_ht->agg_mpdu_cnt);
pos += scnprintf(buf + pos, bufsz - pos, "agg_cnt:\t\t%u\t\t\t%u\n",
le32_to_cpu(ht->agg_cnt), accum_ht->agg_cnt);
+ pos += scnprintf(buf + pos, bufsz - pos, "unsupport_mcs:\t\t%u\t\t\t%u\n",
+ le32_to_cpu(ht->unsupport_mcs),
+ accum_ht->unsupport_mcs);

ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
kfree(buf);
--
1.5.6.3