Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
This commit is contained in:
commit
0374737727
|
@ -1055,8 +1055,9 @@ struct iwl_wep_cmd {
|
||||||
#define RX_RES_PHY_FLAGS_MOD_CCK_MSK cpu_to_le16(1 << 1)
|
#define RX_RES_PHY_FLAGS_MOD_CCK_MSK cpu_to_le16(1 << 1)
|
||||||
#define RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK cpu_to_le16(1 << 2)
|
#define RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK cpu_to_le16(1 << 2)
|
||||||
#define RX_RES_PHY_FLAGS_NARROW_BAND_MSK cpu_to_le16(1 << 3)
|
#define RX_RES_PHY_FLAGS_NARROW_BAND_MSK cpu_to_le16(1 << 3)
|
||||||
#define RX_RES_PHY_FLAGS_ANTENNA_MSK 0xf0
|
#define RX_RES_PHY_FLAGS_ANTENNA_MSK 0x70
|
||||||
#define RX_RES_PHY_FLAGS_ANTENNA_POS 4
|
#define RX_RES_PHY_FLAGS_ANTENNA_POS 4
|
||||||
|
#define RX_RES_PHY_FLAGS_AGG_MSK cpu_to_le16(1 << 7)
|
||||||
|
|
||||||
#define RX_RES_STATUS_SEC_TYPE_MSK (0x7 << 8)
|
#define RX_RES_STATUS_SEC_TYPE_MSK (0x7 << 8)
|
||||||
#define RX_RES_STATUS_SEC_TYPE_NONE (0x0 << 8)
|
#define RX_RES_STATUS_SEC_TYPE_NONE (0x0 << 8)
|
||||||
|
|
|
@ -771,6 +771,7 @@ struct iwl_priv {
|
||||||
u8 agg_tids_count;
|
u8 agg_tids_count;
|
||||||
|
|
||||||
struct iwl_rx_phy_res last_phy_res;
|
struct iwl_rx_phy_res last_phy_res;
|
||||||
|
u32 ampdu_ref;
|
||||||
bool last_phy_res_valid;
|
bool last_phy_res_valid;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -667,6 +667,7 @@ static int iwlagn_rx_reply_rx_phy(struct iwl_priv *priv,
|
||||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||||
|
|
||||||
priv->last_phy_res_valid = true;
|
priv->last_phy_res_valid = true;
|
||||||
|
priv->ampdu_ref++;
|
||||||
memcpy(&priv->last_phy_res, pkt->data,
|
memcpy(&priv->last_phy_res, pkt->data,
|
||||||
sizeof(struct iwl_rx_phy_res));
|
sizeof(struct iwl_rx_phy_res));
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -981,6 +982,16 @@ static int iwlagn_rx_reply_rx(struct iwl_priv *priv,
|
||||||
if (phy_res->phy_flags & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK)
|
if (phy_res->phy_flags & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK)
|
||||||
rx_status.flag |= RX_FLAG_SHORTPRE;
|
rx_status.flag |= RX_FLAG_SHORTPRE;
|
||||||
|
|
||||||
|
if (phy_res->phy_flags & RX_RES_PHY_FLAGS_AGG_MSK) {
|
||||||
|
/*
|
||||||
|
* We know which subframes of an A-MPDU belong
|
||||||
|
* together since we get a single PHY response
|
||||||
|
* from the firmware for all of them
|
||||||
|
*/
|
||||||
|
rx_status.flag |= RX_FLAG_AMPDU_DETAILS;
|
||||||
|
rx_status.ampdu_reference = priv->ampdu_ref;
|
||||||
|
}
|
||||||
|
|
||||||
/* Set up the HT phy flags */
|
/* Set up the HT phy flags */
|
||||||
if (rate_n_flags & RATE_MCS_HT_MSK)
|
if (rate_n_flags & RATE_MCS_HT_MSK)
|
||||||
rx_status.flag |= RX_FLAG_HT;
|
rx_status.flag |= RX_FLAG_HT;
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
#include <linux/tracepoint.h>
|
#include <linux/tracepoint.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
#include "iwl-trans.h"
|
||||||
|
|
||||||
|
|
||||||
#if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)
|
#if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)
|
||||||
|
@ -237,27 +238,34 @@ TRACE_EVENT(iwlwifi_dbg,
|
||||||
#define TRACE_SYSTEM iwlwifi
|
#define TRACE_SYSTEM iwlwifi
|
||||||
|
|
||||||
TRACE_EVENT(iwlwifi_dev_hcmd,
|
TRACE_EVENT(iwlwifi_dev_hcmd,
|
||||||
TP_PROTO(const struct device *dev, u32 flags,
|
TP_PROTO(const struct device *dev,
|
||||||
const void *hcmd0, size_t len0,
|
struct iwl_host_cmd *cmd, u16 total_size,
|
||||||
const void *hcmd1, size_t len1,
|
const void *hdr, size_t hdr_len),
|
||||||
const void *hcmd2, size_t len2),
|
TP_ARGS(dev, cmd, total_size, hdr, hdr_len),
|
||||||
TP_ARGS(dev, flags, hcmd0, len0, hcmd1, len1, hcmd2, len2),
|
|
||||||
TP_STRUCT__entry(
|
TP_STRUCT__entry(
|
||||||
DEV_ENTRY
|
DEV_ENTRY
|
||||||
__dynamic_array(u8, hcmd0, len0)
|
__dynamic_array(u8, hcmd, total_size)
|
||||||
__dynamic_array(u8, hcmd1, len1)
|
|
||||||
__dynamic_array(u8, hcmd2, len2)
|
|
||||||
__field(u32, flags)
|
__field(u32, flags)
|
||||||
),
|
),
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
|
int i, offset = hdr_len;
|
||||||
|
|
||||||
DEV_ASSIGN;
|
DEV_ASSIGN;
|
||||||
memcpy(__get_dynamic_array(hcmd0), hcmd0, len0);
|
__entry->flags = cmd->flags;
|
||||||
memcpy(__get_dynamic_array(hcmd1), hcmd1, len1);
|
memcpy(__get_dynamic_array(hcmd), hdr, hdr_len);
|
||||||
memcpy(__get_dynamic_array(hcmd2), hcmd2, len2);
|
|
||||||
__entry->flags = flags;
|
for (i = 0; i < IWL_MAX_CMD_TFDS; i++) {
|
||||||
|
if (!cmd->len[i])
|
||||||
|
continue;
|
||||||
|
if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY))
|
||||||
|
continue;
|
||||||
|
memcpy((u8 *)__get_dynamic_array(hcmd) + offset,
|
||||||
|
cmd->data[i], cmd->len[i]);
|
||||||
|
offset += cmd->len[i];
|
||||||
|
}
|
||||||
),
|
),
|
||||||
TP_printk("[%s] hcmd %#.2x (%ssync)",
|
TP_printk("[%s] hcmd %#.2x (%ssync)",
|
||||||
__get_str(dev), ((u8 *)__get_dynamic_array(hcmd0))[0],
|
__get_str(dev), ((u8 *)__get_dynamic_array(hcmd))[0],
|
||||||
__entry->flags & CMD_ASYNC ? "a" : "")
|
__entry->flags & CMD_ASYNC ? "a" : "")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -85,8 +85,6 @@ struct iwl_eeprom_data {
|
||||||
int n_hw_addrs;
|
int n_hw_addrs;
|
||||||
u8 hw_addr[ETH_ALEN];
|
u8 hw_addr[ETH_ALEN];
|
||||||
|
|
||||||
u16 radio_config;
|
|
||||||
|
|
||||||
u8 calib_version;
|
u8 calib_version;
|
||||||
__le16 calib_voltage;
|
__le16 calib_voltage;
|
||||||
|
|
||||||
|
|
|
@ -522,11 +522,6 @@ static int iwl_enqueue_hcmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
|
||||||
bool had_nocopy = false;
|
bool had_nocopy = false;
|
||||||
int i;
|
int i;
|
||||||
u32 cmd_pos;
|
u32 cmd_pos;
|
||||||
#ifdef CONFIG_IWLWIFI_DEVICE_TRACING
|
|
||||||
const void *trace_bufs[IWL_MAX_CMD_TFDS + 1] = {};
|
|
||||||
int trace_lens[IWL_MAX_CMD_TFDS + 1] = {};
|
|
||||||
int trace_idx;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
copy_size = sizeof(out_cmd->hdr);
|
copy_size = sizeof(out_cmd->hdr);
|
||||||
cmd_size = sizeof(out_cmd->hdr);
|
cmd_size = sizeof(out_cmd->hdr);
|
||||||
|
@ -628,11 +623,6 @@ static int iwl_enqueue_hcmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
|
||||||
dma_unmap_len_set(out_meta, len, copy_size);
|
dma_unmap_len_set(out_meta, len, copy_size);
|
||||||
|
|
||||||
iwlagn_txq_attach_buf_to_tfd(trans, txq, phys_addr, copy_size, 1);
|
iwlagn_txq_attach_buf_to_tfd(trans, txq, phys_addr, copy_size, 1);
|
||||||
#ifdef CONFIG_IWLWIFI_DEVICE_TRACING
|
|
||||||
trace_bufs[0] = &out_cmd->hdr;
|
|
||||||
trace_lens[0] = copy_size;
|
|
||||||
trace_idx = 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i = 0; i < IWL_MAX_CMD_TFDS; i++) {
|
for (i = 0; i < IWL_MAX_CMD_TFDS; i++) {
|
||||||
if (!cmd->len[i])
|
if (!cmd->len[i])
|
||||||
|
@ -651,25 +641,14 @@ static int iwl_enqueue_hcmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
|
||||||
|
|
||||||
iwlagn_txq_attach_buf_to_tfd(trans, txq, phys_addr,
|
iwlagn_txq_attach_buf_to_tfd(trans, txq, phys_addr,
|
||||||
cmd->len[i], 0);
|
cmd->len[i], 0);
|
||||||
#ifdef CONFIG_IWLWIFI_DEVICE_TRACING
|
|
||||||
trace_bufs[trace_idx] = cmd->data[i];
|
|
||||||
trace_lens[trace_idx] = cmd->len[i];
|
|
||||||
trace_idx++;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out_meta->flags = cmd->flags;
|
out_meta->flags = cmd->flags;
|
||||||
|
|
||||||
txq->need_update = 1;
|
txq->need_update = 1;
|
||||||
|
|
||||||
/* check that tracing gets all possible blocks */
|
trace_iwlwifi_dev_hcmd(trans->dev, cmd, cmd_size,
|
||||||
BUILD_BUG_ON(IWL_MAX_CMD_TFDS + 1 != 3);
|
&out_cmd->hdr, copy_size);
|
||||||
#ifdef CONFIG_IWLWIFI_DEVICE_TRACING
|
|
||||||
trace_iwlwifi_dev_hcmd(trans->dev, cmd->flags,
|
|
||||||
trace_bufs[0], trace_lens[0],
|
|
||||||
trace_bufs[1], trace_lens[1],
|
|
||||||
trace_bufs[2], trace_lens[2]);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* start timer if queue currently empty */
|
/* start timer if queue currently empty */
|
||||||
if (q->read_ptr == q->write_ptr && trans_pcie->wd_timeout)
|
if (q->read_ptr == q->write_ptr && trans_pcie->wd_timeout)
|
||||||
|
|
Loading…
Reference in New Issue