aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/main.c1
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/rx.c44
2 files changed, 11 insertions, 34 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c
index 612f05d757db..84d3db5aa506 100644
--- a/drivers/net/wireless/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/iwlwifi/dvm/main.c
@@ -1232,7 +1232,6 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1232 struct iwl_trans_config trans_cfg; 1232 struct iwl_trans_config trans_cfg;
1233 static const u8 no_reclaim_cmds[] = { 1233 static const u8 no_reclaim_cmds[] = {
1234 REPLY_RX_PHY_CMD, 1234 REPLY_RX_PHY_CMD,
1235 REPLY_RX,
1236 REPLY_RX_MPDU_CMD, 1235 REPLY_RX_MPDU_CMD,
1237 REPLY_COMPRESSED_BA, 1236 REPLY_COMPRESSED_BA,
1238 STATISTICS_NOTIFICATION, 1237 STATISTICS_NOTIFICATION,
diff --git a/drivers/net/wireless/iwlwifi/dvm/rx.c b/drivers/net/wireless/iwlwifi/dvm/rx.c
index c1f7a18e08dd..fee5cffa1669 100644
--- a/drivers/net/wireless/iwlwifi/dvm/rx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/rx.c
@@ -88,7 +88,6 @@ const char *iwl_dvm_cmd_strings[REPLY_MAX] = {
88 IWL_CMD_ENTRY(REPLY_PHY_CALIBRATION_CMD), 88 IWL_CMD_ENTRY(REPLY_PHY_CALIBRATION_CMD),
89 IWL_CMD_ENTRY(REPLY_RX_PHY_CMD), 89 IWL_CMD_ENTRY(REPLY_RX_PHY_CMD),
90 IWL_CMD_ENTRY(REPLY_RX_MPDU_CMD), 90 IWL_CMD_ENTRY(REPLY_RX_MPDU_CMD),
91 IWL_CMD_ENTRY(REPLY_RX),
92 IWL_CMD_ENTRY(REPLY_COMPRESSED_BA), 91 IWL_CMD_ENTRY(REPLY_COMPRESSED_BA),
93 IWL_CMD_ENTRY(CALIBRATION_CFG_CMD), 92 IWL_CMD_ENTRY(CALIBRATION_CFG_CMD),
94 IWL_CMD_ENTRY(CALIBRATION_RES_NOTIFICATION), 93 IWL_CMD_ENTRY(CALIBRATION_RES_NOTIFICATION),
@@ -895,8 +894,7 @@ static int iwlagn_calc_rssi(struct iwl_priv *priv,
895 return max_rssi - agc - IWLAGN_RSSI_OFFSET; 894 return max_rssi - agc - IWLAGN_RSSI_OFFSET;
896} 895}
897 896
898/* Called for REPLY_RX (legacy ABG frames), or 897/* Called for REPLY_RX_MPDU_CMD */
899 * REPLY_RX_MPDU_CMD (HT high-throughput N frames). */
900static int iwlagn_rx_reply_rx(struct iwl_priv *priv, 898static int iwlagn_rx_reply_rx(struct iwl_priv *priv,
901 struct iwl_rx_cmd_buffer *rxb, 899 struct iwl_rx_cmd_buffer *rxb,
902 struct iwl_device_cmd *cmd) 900 struct iwl_device_cmd *cmd)
@@ -911,37 +909,17 @@ static int iwlagn_rx_reply_rx(struct iwl_priv *priv,
911 u32 ampdu_status; 909 u32 ampdu_status;
912 u32 rate_n_flags; 910 u32 rate_n_flags;
913 911
914 /** 912 if (!priv->last_phy_res_valid) {
915 * REPLY_RX and REPLY_RX_MPDU_CMD are handled differently. 913 IWL_ERR(priv, "MPDU frame without cached PHY data\n");
916 * REPLY_RX: physical layer info is in this buffer 914 return 0;
917 * REPLY_RX_MPDU_CMD: physical layer info was sent in separate
918 * command and cached in priv->last_phy_res
919 *
920 * Here we set up local variables depending on which command is
921 * received.
922 */
923 if (pkt->hdr.cmd == REPLY_RX) {
924 phy_res = (struct iwl_rx_phy_res *)pkt->data;
925 header = (struct ieee80211_hdr *)(pkt->data + sizeof(*phy_res)
926 + phy_res->cfg_phy_cnt);
927
928 len = le16_to_cpu(phy_res->byte_count);
929 rx_pkt_status = *(__le32 *)(pkt->data + sizeof(*phy_res) +
930 phy_res->cfg_phy_cnt + len);
931 ampdu_status = le32_to_cpu(rx_pkt_status);
932 } else {
933 if (!priv->last_phy_res_valid) {
934 IWL_ERR(priv, "MPDU frame without cached PHY data\n");
935 return 0;
936 }
937 phy_res = &priv->last_phy_res;
938 amsdu = (struct iwl_rx_mpdu_res_start *)pkt->data;
939 header = (struct ieee80211_hdr *)(pkt->data + sizeof(*amsdu));
940 len = le16_to_cpu(amsdu->byte_count);
941 rx_pkt_status = *(__le32 *)(pkt->data + sizeof(*amsdu) + len);
942 ampdu_status = iwlagn_translate_rx_status(priv,
943 le32_to_cpu(rx_pkt_status));
944 } 915 }
916 phy_res = &priv->last_phy_res;
917 amsdu = (struct iwl_rx_mpdu_res_start *)pkt->data;
918 header = (struct ieee80211_hdr *)(pkt->data + sizeof(*amsdu));
919 len = le16_to_cpu(amsdu->byte_count);
920 rx_pkt_status = *(__le32 *)(pkt->data + sizeof(*amsdu) + len);
921 ampdu_status = iwlagn_translate_rx_status(priv,
922 le32_to_cpu(rx_pkt_status));
945 923
946 if ((unlikely(phy_res->cfg_phy_cnt > 20))) { 924 if ((unlikely(phy_res->cfg_phy_cnt > 20))) {
947 IWL_DEBUG_DROP(priv, "dsp size out of range [0,20]: %d\n", 925 IWL_DEBUG_DROP(priv, "dsp size out of range [0,20]: %d\n",