aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2013-01-18 17:47:19 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-01 14:27:21 -0500
commit0255beda59d3b46c06429699d139ad683b33e5f1 (patch)
tree8d2f441ed91bf72a33d55f925d558d796ada74ba /drivers/net/wireless/iwlegacy
parent5d38745fa896804ce83cb975ba6bf184d0e85ba0 (diff)
iwl4965: report A-MPDU status
This patch is based on "iwlwifi: report A-MPDU status". (12bf6f45d1703858) Since the firmware will give us an A-MPDU bit and only a single PHY information packet for all the subframes in an A-MPDU, we can easily report the minimal A-MPDU information for radiotap. Cc: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c11
-rw-r--r--drivers/net/wireless/iwlegacy/commands.h1
-rw-r--r--drivers/net/wireless/iwlegacy/common.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index d665a3d9f08f..d2d5aae21d38 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -725,6 +725,16 @@ il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb)
725 if (rate_n_flags & RATE_MCS_SGI_MSK) 725 if (rate_n_flags & RATE_MCS_SGI_MSK)
726 rx_status.flag |= RX_FLAG_SHORT_GI; 726 rx_status.flag |= RX_FLAG_SHORT_GI;
727 727
728 if (phy_res->phy_flags & RX_RES_PHY_FLAGS_AGG_MSK) {
729 /* We know which subframes of an A-MPDU belong
730 * together since we get a single PHY response
731 * from the firmware for all of them.
732 */
733
734 rx_status.flag |= RX_FLAG_AMPDU_DETAILS;
735 rx_status.ampdu_reference = il->_4965.ampdu_ref;
736 }
737
728 il4965_pass_packet_to_mac80211(il, header, len, ampdu_status, rxb, 738 il4965_pass_packet_to_mac80211(il, header, len, ampdu_status, rxb,
729 &rx_status); 739 &rx_status);
730} 740}
@@ -736,6 +746,7 @@ il4965_hdl_rx_phy(struct il_priv *il, struct il_rx_buf *rxb)
736{ 746{
737 struct il_rx_pkt *pkt = rxb_addr(rxb); 747 struct il_rx_pkt *pkt = rxb_addr(rxb);
738 il->_4965.last_phy_res_valid = true; 748 il->_4965.last_phy_res_valid = true;
749 il->_4965.ampdu_ref++;
739 memcpy(&il->_4965.last_phy_res, pkt->u.raw, 750 memcpy(&il->_4965.last_phy_res, pkt->u.raw,
740 sizeof(struct il_rx_phy_res)); 751 sizeof(struct il_rx_phy_res));
741} 752}
diff --git a/drivers/net/wireless/iwlegacy/commands.h b/drivers/net/wireless/iwlegacy/commands.h
index 829d3b9aaa17..3b6c99400892 100644
--- a/drivers/net/wireless/iwlegacy/commands.h
+++ b/drivers/net/wireless/iwlegacy/commands.h
@@ -1136,6 +1136,7 @@ struct il_wep_cmd {
1136#define RX_RES_PHY_FLAGS_NARROW_BAND_MSK cpu_to_le16(1 << 3) 1136#define RX_RES_PHY_FLAGS_NARROW_BAND_MSK cpu_to_le16(1 << 3)
1137#define RX_RES_PHY_FLAGS_ANTENNA_MSK 0x70 1137#define RX_RES_PHY_FLAGS_ANTENNA_MSK 0x70
1138#define RX_RES_PHY_FLAGS_ANTENNA_POS 4 1138#define RX_RES_PHY_FLAGS_ANTENNA_POS 4
1139#define RX_RES_PHY_FLAGS_AGG_MSK cpu_to_le16(1 << 7)
1139 1140
1140#define RX_RES_STATUS_SEC_TYPE_MSK (0x7 << 8) 1141#define RX_RES_STATUS_SEC_TYPE_MSK (0x7 << 8)
1141#define RX_RES_STATUS_SEC_TYPE_NONE (0x0 << 8) 1142#define RX_RES_STATUS_SEC_TYPE_NONE (0x0 << 8)
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index 37fe553b25e0..96f2025d936e 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1356,6 +1356,7 @@ struct il_priv {
1356 struct { 1356 struct {
1357 struct il_rx_phy_res last_phy_res; 1357 struct il_rx_phy_res last_phy_res;
1358 bool last_phy_res_valid; 1358 bool last_phy_res_valid;
1359 u32 ampdu_ref;
1359 1360
1360 struct completion firmware_loading_complete; 1361 struct completion firmware_loading_complete;
1361 1362