diff options
author | Johannes Berg <johannes.berg@intel.com> | 2016-08-03 03:34:39 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2016-09-16 02:10:33 -0400 |
commit | 723d11a4cdf63544a01ae7a474c202a914b67a3b (patch) | |
tree | 83e8e3f09f7c4562f17c8e213bbe568f67ee0d4c | |
parent | 612da1efc07f28ea9e64402820dd25287ff5233b (diff) |
iwlwifi: mvm: make RSS RX more robust
If the firmware ever decides to send any new/more notifications
to the RSS queues, the driver would currently try to interpret
those as REPLY_RX_MPDU_CMD and, if the notification was small,
access invalid memory.
Prevent that by checking for REPLY_RX_MPDU_CMD explicitly which
allows ignoring unexpected notifications.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 55d9096da68c..43ea1e5fdfc6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
@@ -1672,7 +1672,7 @@ static void iwl_mvm_rx_mq_rss(struct iwl_op_mode *op_mode, | |||
1672 | else if (unlikely(pkt->hdr.cmd == RX_QUEUES_NOTIFICATION && | 1672 | else if (unlikely(pkt->hdr.cmd == RX_QUEUES_NOTIFICATION && |
1673 | pkt->hdr.group_id == DATA_PATH_GROUP)) | 1673 | pkt->hdr.group_id == DATA_PATH_GROUP)) |
1674 | iwl_mvm_rx_queue_notif(mvm, rxb, queue); | 1674 | iwl_mvm_rx_queue_notif(mvm, rxb, queue); |
1675 | else | 1675 | else if (likely(pkt->hdr.cmd == REPLY_RX_MPDU_CMD)) |
1676 | iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, queue); | 1676 | iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, queue); |
1677 | } | 1677 | } |
1678 | 1678 | ||