summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2016-06-26 13:17:56 +0300
committerLuca Coelho <luciano.coelho@intel.com>2016-09-16 09:10:21 +0300
commit6983ba6951139c99f0692c94f83d8d75ea559bcc (patch)
tree474b72204352c91f3e2d59041834753a2d4af8df /drivers/net/wireless/intel/iwlwifi/pcie/internal.h
parent8aacf4b73fe87bc8fbe75a83862f411b52b7f272 (diff)
downloadlinux-6983ba6951139c99f0692c94f83d8d75ea559bcc.tar.xz
iwlwifi: pcie: assign and access a000 TFD & TBs
Previous patch introduced the new formats. This patch allocates the new structures and adjusts code accordingly. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/pcie/internal.h')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/internal.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
index b9dc82b981e1..d185692676fd 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
@@ -280,7 +280,7 @@ struct iwl_pcie_first_tb_buf {
*/
struct iwl_txq {
struct iwl_queue q;
- struct iwl_tfd *tfds;
+ void *tfds;
struct iwl_pcie_first_tb_buf *first_tb_bufs;
dma_addr_t first_tb_dma;
struct iwl_pcie_txq_entry *entries;
@@ -393,6 +393,7 @@ struct iwl_trans_pcie {
u8 n_no_reclaim_cmds;
u8 no_reclaim_cmds[MAX_NO_RECLAIM_CMDS];
u8 max_tbs;
+ u16 tfd_size;
enum iwl_amsdu_size rx_buf_size;
bool bc_table_dword;
@@ -489,9 +490,21 @@ void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn,
struct sk_buff_head *skbs);
void iwl_trans_pcie_tx_reset(struct iwl_trans *trans);
-static inline u16 iwl_pcie_tfd_tb_get_len(struct iwl_tfd *tfd, u8 idx)
+static inline u16 iwl_pcie_tfd_tb_get_len(struct iwl_trans *trans, void *tfd,
+ u8 idx)
{
- struct iwl_tfd_tb *tb = &tfd->tbs[idx];
+ struct iwl_tfd *tfd_fh;
+ struct iwl_tfd_tb *tb;
+
+ if (trans->cfg->use_tfh) {
+ struct iwl_tfh_tfd *tfd_fh = (void *)tfd;
+ struct iwl_tfh_tb *tb = &tfd_fh->tbs[idx];
+
+ return le16_to_cpu(tb->tb_len);
+ }
+
+ tfd_fh = (void *)tfd;
+ tb = &tfd_fh->tbs[idx];
return le16_to_cpu(tb->hi_n_len) >> 4;
}