Commit 0374737727b65f31b9357051b421a3141c0d39ec
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
Showing 6 changed files Side-by-side Diff
drivers/net/wireless/iwlwifi/dvm/commands.h
... | ... | @@ -1055,8 +1055,9 @@ |
1055 | 1055 | #define RX_RES_PHY_FLAGS_MOD_CCK_MSK cpu_to_le16(1 << 1) |
1056 | 1056 | #define RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK cpu_to_le16(1 << 2) |
1057 | 1057 | #define RX_RES_PHY_FLAGS_NARROW_BAND_MSK cpu_to_le16(1 << 3) |
1058 | -#define RX_RES_PHY_FLAGS_ANTENNA_MSK 0xf0 | |
1058 | +#define RX_RES_PHY_FLAGS_ANTENNA_MSK 0x70 | |
1059 | 1059 | #define RX_RES_PHY_FLAGS_ANTENNA_POS 4 |
1060 | +#define RX_RES_PHY_FLAGS_AGG_MSK cpu_to_le16(1 << 7) | |
1060 | 1061 | |
1061 | 1062 | #define RX_RES_STATUS_SEC_TYPE_MSK (0x7 << 8) |
1062 | 1063 | #define RX_RES_STATUS_SEC_TYPE_NONE (0x0 << 8) |
drivers/net/wireless/iwlwifi/dvm/dev.h
drivers/net/wireless/iwlwifi/dvm/rx.c
... | ... | @@ -667,6 +667,7 @@ |
667 | 667 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
668 | 668 | |
669 | 669 | priv->last_phy_res_valid = true; |
670 | + priv->ampdu_ref++; | |
670 | 671 | memcpy(&priv->last_phy_res, pkt->data, |
671 | 672 | sizeof(struct iwl_rx_phy_res)); |
672 | 673 | return 0; |
... | ... | @@ -980,6 +981,16 @@ |
980 | 981 | /* set the preamble flag if appropriate */ |
981 | 982 | if (phy_res->phy_flags & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK) |
982 | 983 | rx_status.flag |= RX_FLAG_SHORTPRE; |
984 | + | |
985 | + if (phy_res->phy_flags & RX_RES_PHY_FLAGS_AGG_MSK) { | |
986 | + /* | |
987 | + * We know which subframes of an A-MPDU belong | |
988 | + * together since we get a single PHY response | |
989 | + * from the firmware for all of them | |
990 | + */ | |
991 | + rx_status.flag |= RX_FLAG_AMPDU_DETAILS; | |
992 | + rx_status.ampdu_reference = priv->ampdu_ref; | |
993 | + } | |
983 | 994 | |
984 | 995 | /* Set up the HT phy flags */ |
985 | 996 | if (rate_n_flags & RATE_MCS_HT_MSK) |
drivers/net/wireless/iwlwifi/iwl-devtrace.h
... | ... | @@ -29,6 +29,7 @@ |
29 | 29 | |
30 | 30 | #include <linux/tracepoint.h> |
31 | 31 | #include <linux/device.h> |
32 | +#include "iwl-trans.h" | |
32 | 33 | |
33 | 34 | |
34 | 35 | #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__) |
35 | 36 | |
36 | 37 | |
37 | 38 | |
38 | 39 | |
... | ... | @@ -237,27 +238,34 @@ |
237 | 238 | #define TRACE_SYSTEM iwlwifi |
238 | 239 | |
239 | 240 | TRACE_EVENT(iwlwifi_dev_hcmd, |
240 | - TP_PROTO(const struct device *dev, u32 flags, | |
241 | - const void *hcmd0, size_t len0, | |
242 | - const void *hcmd1, size_t len1, | |
243 | - const void *hcmd2, size_t len2), | |
244 | - TP_ARGS(dev, flags, hcmd0, len0, hcmd1, len1, hcmd2, len2), | |
241 | + TP_PROTO(const struct device *dev, | |
242 | + struct iwl_host_cmd *cmd, u16 total_size, | |
243 | + const void *hdr, size_t hdr_len), | |
244 | + TP_ARGS(dev, cmd, total_size, hdr, hdr_len), | |
245 | 245 | TP_STRUCT__entry( |
246 | 246 | DEV_ENTRY |
247 | - __dynamic_array(u8, hcmd0, len0) | |
248 | - __dynamic_array(u8, hcmd1, len1) | |
249 | - __dynamic_array(u8, hcmd2, len2) | |
247 | + __dynamic_array(u8, hcmd, total_size) | |
250 | 248 | __field(u32, flags) |
251 | 249 | ), |
252 | 250 | TP_fast_assign( |
251 | + int i, offset = hdr_len; | |
252 | + | |
253 | 253 | DEV_ASSIGN; |
254 | - memcpy(__get_dynamic_array(hcmd0), hcmd0, len0); | |
255 | - memcpy(__get_dynamic_array(hcmd1), hcmd1, len1); | |
256 | - memcpy(__get_dynamic_array(hcmd2), hcmd2, len2); | |
257 | - __entry->flags = flags; | |
254 | + __entry->flags = cmd->flags; | |
255 | + memcpy(__get_dynamic_array(hcmd), hdr, hdr_len); | |
256 | + | |
257 | + for (i = 0; i < IWL_MAX_CMD_TFDS; i++) { | |
258 | + if (!cmd->len[i]) | |
259 | + continue; | |
260 | + if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY)) | |
261 | + continue; | |
262 | + memcpy((u8 *)__get_dynamic_array(hcmd) + offset, | |
263 | + cmd->data[i], cmd->len[i]); | |
264 | + offset += cmd->len[i]; | |
265 | + } | |
258 | 266 | ), |
259 | 267 | TP_printk("[%s] hcmd %#.2x (%ssync)", |
260 | - __get_str(dev), ((u8 *)__get_dynamic_array(hcmd0))[0], | |
268 | + __get_str(dev), ((u8 *)__get_dynamic_array(hcmd))[0], | |
261 | 269 | __entry->flags & CMD_ASYNC ? "a" : "") |
262 | 270 | ); |
263 | 271 |
drivers/net/wireless/iwlwifi/iwl-eeprom-parse.h
drivers/net/wireless/iwlwifi/pcie/tx.c
... | ... | @@ -522,11 +522,6 @@ |
522 | 522 | bool had_nocopy = false; |
523 | 523 | int i; |
524 | 524 | u32 cmd_pos; |
525 | -#ifdef CONFIG_IWLWIFI_DEVICE_TRACING | |
526 | - const void *trace_bufs[IWL_MAX_CMD_TFDS + 1] = {}; | |
527 | - int trace_lens[IWL_MAX_CMD_TFDS + 1] = {}; | |
528 | - int trace_idx; | |
529 | -#endif | |
530 | 525 | |
531 | 526 | copy_size = sizeof(out_cmd->hdr); |
532 | 527 | cmd_size = sizeof(out_cmd->hdr); |
... | ... | @@ -628,11 +623,6 @@ |
628 | 623 | dma_unmap_len_set(out_meta, len, copy_size); |
629 | 624 | |
630 | 625 | iwlagn_txq_attach_buf_to_tfd(trans, txq, phys_addr, copy_size, 1); |
631 | -#ifdef CONFIG_IWLWIFI_DEVICE_TRACING | |
632 | - trace_bufs[0] = &out_cmd->hdr; | |
633 | - trace_lens[0] = copy_size; | |
634 | - trace_idx = 1; | |
635 | -#endif | |
636 | 626 | |
637 | 627 | for (i = 0; i < IWL_MAX_CMD_TFDS; i++) { |
638 | 628 | if (!cmd->len[i]) |
639 | 629 | |
... | ... | @@ -651,25 +641,14 @@ |
651 | 641 | |
652 | 642 | iwlagn_txq_attach_buf_to_tfd(trans, txq, phys_addr, |
653 | 643 | cmd->len[i], 0); |
654 | -#ifdef CONFIG_IWLWIFI_DEVICE_TRACING | |
655 | - trace_bufs[trace_idx] = cmd->data[i]; | |
656 | - trace_lens[trace_idx] = cmd->len[i]; | |
657 | - trace_idx++; | |
658 | -#endif | |
659 | 644 | } |
660 | 645 | |
661 | 646 | out_meta->flags = cmd->flags; |
662 | 647 | |
663 | 648 | txq->need_update = 1; |
664 | 649 | |
665 | - /* check that tracing gets all possible blocks */ | |
666 | - BUILD_BUG_ON(IWL_MAX_CMD_TFDS + 1 != 3); | |
667 | -#ifdef CONFIG_IWLWIFI_DEVICE_TRACING | |
668 | - trace_iwlwifi_dev_hcmd(trans->dev, cmd->flags, | |
669 | - trace_bufs[0], trace_lens[0], | |
670 | - trace_bufs[1], trace_lens[1], | |
671 | - trace_bufs[2], trace_lens[2]); | |
672 | -#endif | |
650 | + trace_iwlwifi_dev_hcmd(trans->dev, cmd, cmd_size, | |
651 | + &out_cmd->hdr, copy_size); | |
673 | 652 | |
674 | 653 | /* start timer if queue currently empty */ |
675 | 654 | if (q->read_ptr == q->write_ptr && trans_pcie->wd_timeout) |