diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 61b3b0e6ed73..6090bc15a6d5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -477,7 +477,8 @@ int iwl_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | |||
477 | (rb_timeout << FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS)| | 477 | (rb_timeout << FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS)| |
478 | (rfdnlog << FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS)); | 478 | (rfdnlog << FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS)); |
479 | 479 | ||
480 | iwl_write32(priv, CSR_INT_COALESCING, 0x40); | 480 | /* Set interrupt coalescing timer to 64 x 32 = 2048 usecs */ |
481 | iwl_write8(priv, CSR_INT_COALESCING, 0x40); | ||
481 | 482 | ||
482 | return 0; | 483 | return 0; |
483 | } | 484 | } |
@@ -635,6 +636,24 @@ void iwl_rx_statistics(struct iwl_priv *priv, | |||
635 | } | 636 | } |
636 | EXPORT_SYMBOL(iwl_rx_statistics); | 637 | EXPORT_SYMBOL(iwl_rx_statistics); |
637 | 638 | ||
639 | void iwl_reply_statistics(struct iwl_priv *priv, | ||
640 | struct iwl_rx_mem_buffer *rxb) | ||
641 | { | ||
642 | struct iwl_rx_packet *pkt = rxb_addr(rxb); | ||
643 | |||
644 | if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) { | ||
645 | memset(&priv->statistics, 0, | ||
646 | sizeof(struct iwl_notif_statistics)); | ||
647 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
648 | memset(&priv->accum_statistics, 0, | ||
649 | sizeof(struct iwl_notif_statistics)); | ||
650 | #endif | ||
651 | IWL_DEBUG_RX(priv, "Statistics have been cleared\n"); | ||
652 | } | ||
653 | iwl_rx_statistics(priv, rxb); | ||
654 | } | ||
655 | EXPORT_SYMBOL(iwl_reply_statistics); | ||
656 | |||
638 | #define PERFECT_RSSI (-20) /* dBm */ | 657 | #define PERFECT_RSSI (-20) /* dBm */ |
639 | #define WORST_RSSI (-95) /* dBm */ | 658 | #define WORST_RSSI (-95) /* dBm */ |
640 | #define RSSI_RANGE (PERFECT_RSSI - WORST_RSSI) | 659 | #define RSSI_RANGE (PERFECT_RSSI - WORST_RSSI) |
@@ -1010,7 +1029,6 @@ void iwl_rx_reply_rx(struct iwl_priv *priv, | |||
1010 | struct iwl4965_rx_mpdu_res_start *amsdu; | 1029 | struct iwl4965_rx_mpdu_res_start *amsdu; |
1011 | u32 len; | 1030 | u32 len; |
1012 | u32 ampdu_status; | 1031 | u32 ampdu_status; |
1013 | u16 fc; | ||
1014 | u32 rate_n_flags; | 1032 | u32 rate_n_flags; |
1015 | 1033 | ||
1016 | /** | 1034 | /** |
@@ -1143,20 +1161,8 @@ void iwl_rx_reply_rx(struct iwl_priv *priv, | |||
1143 | priv->last_tsf = le64_to_cpu(phy_res->timestamp); | 1161 | priv->last_tsf = le64_to_cpu(phy_res->timestamp); |
1144 | } | 1162 | } |
1145 | 1163 | ||
1146 | fc = le16_to_cpu(header->frame_control); | 1164 | iwl_pass_packet_to_mac80211(priv, header, len, ampdu_status, |
1147 | switch (fc & IEEE80211_FCTL_FTYPE) { | 1165 | rxb, &rx_status); |
1148 | case IEEE80211_FTYPE_MGMT: | ||
1149 | case IEEE80211_FTYPE_DATA: | ||
1150 | if (priv->iw_mode == NL80211_IFTYPE_AP) | ||
1151 | iwl_update_ps_mode(priv, fc & IEEE80211_FCTL_PM, | ||
1152 | header->addr2); | ||
1153 | /* fall through */ | ||
1154 | default: | ||
1155 | iwl_pass_packet_to_mac80211(priv, header, len, ampdu_status, | ||
1156 | rxb, &rx_status); | ||
1157 | break; | ||
1158 | |||
1159 | } | ||
1160 | } | 1166 | } |
1161 | EXPORT_SYMBOL(iwl_rx_reply_rx); | 1167 | EXPORT_SYMBOL(iwl_rx_reply_rx); |
1162 | 1168 | ||