mirror of https://gitee.com/openkylin/linux.git
iwlwifi: mvm: compare full command ID
When comparing command IDs, the group should be taken
into account so the same command/notification from a
different group doesn't trigger anything unexpected.
Fix this by comparing to the wide ID.
Fixes: commit 1738d60b31
("iwlwifi: mvm: handle RX MPDUs separately")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
5a710b8606
commit
61b0f5d7c4
|
@ -966,10 +966,11 @@ static void iwl_mvm_rx(struct iwl_op_mode *op_mode,
|
||||||
{
|
{
|
||||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||||
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
|
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
|
||||||
|
u16 cmd = WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd);
|
||||||
|
|
||||||
if (likely(pkt->hdr.cmd == REPLY_RX_MPDU_CMD))
|
if (likely(cmd == WIDE_ID(LEGACY_GROUP, REPLY_RX_MPDU_CMD)))
|
||||||
iwl_mvm_rx_rx_mpdu(mvm, napi, rxb);
|
iwl_mvm_rx_rx_mpdu(mvm, napi, rxb);
|
||||||
else if (pkt->hdr.cmd == REPLY_RX_PHY_CMD)
|
else if (cmd == WIDE_ID(LEGACY_GROUP, REPLY_RX_PHY_CMD))
|
||||||
iwl_mvm_rx_rx_phy_cmd(mvm, rxb);
|
iwl_mvm_rx_rx_phy_cmd(mvm, rxb);
|
||||||
else
|
else
|
||||||
iwl_mvm_rx_common(mvm, rxb, pkt);
|
iwl_mvm_rx_common(mvm, rxb, pkt);
|
||||||
|
@ -981,13 +982,14 @@ static void iwl_mvm_rx_mq(struct iwl_op_mode *op_mode,
|
||||||
{
|
{
|
||||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||||
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
|
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
|
||||||
|
u16 cmd = WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd);
|
||||||
|
|
||||||
if (likely(pkt->hdr.cmd == REPLY_RX_MPDU_CMD))
|
if (likely(cmd == WIDE_ID(LEGACY_GROUP, REPLY_RX_MPDU_CMD)))
|
||||||
iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, 0);
|
iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, 0);
|
||||||
else if (unlikely(pkt->hdr.group_id == DATA_PATH_GROUP &&
|
else if (unlikely(cmd == WIDE_ID(DATA_PATH_GROUP,
|
||||||
pkt->hdr.cmd == RX_QUEUES_NOTIFICATION))
|
RX_QUEUES_NOTIFICATION)))
|
||||||
iwl_mvm_rx_queue_notif(mvm, rxb, 0);
|
iwl_mvm_rx_queue_notif(mvm, rxb, 0);
|
||||||
else if (pkt->hdr.cmd == FRAME_RELEASE)
|
else if (cmd == WIDE_ID(LEGACY_GROUP, FRAME_RELEASE))
|
||||||
iwl_mvm_rx_frame_release(mvm, napi, rxb, 0);
|
iwl_mvm_rx_frame_release(mvm, napi, rxb, 0);
|
||||||
else
|
else
|
||||||
iwl_mvm_rx_common(mvm, rxb, pkt);
|
iwl_mvm_rx_common(mvm, rxb, pkt);
|
||||||
|
@ -1666,13 +1668,14 @@ static void iwl_mvm_rx_mq_rss(struct iwl_op_mode *op_mode,
|
||||||
{
|
{
|
||||||
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
|
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
|
||||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||||
|
u16 cmd = WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd);
|
||||||
|
|
||||||
if (unlikely(pkt->hdr.cmd == FRAME_RELEASE))
|
if (unlikely(cmd == WIDE_ID(LEGACY_GROUP, FRAME_RELEASE)))
|
||||||
iwl_mvm_rx_frame_release(mvm, napi, rxb, queue);
|
iwl_mvm_rx_frame_release(mvm, napi, rxb, queue);
|
||||||
else if (unlikely(pkt->hdr.cmd == RX_QUEUES_NOTIFICATION &&
|
else if (unlikely(cmd == WIDE_ID(DATA_PATH_GROUP,
|
||||||
pkt->hdr.group_id == DATA_PATH_GROUP))
|
RX_QUEUES_NOTIFICATION)))
|
||||||
iwl_mvm_rx_queue_notif(mvm, rxb, queue);
|
iwl_mvm_rx_queue_notif(mvm, rxb, queue);
|
||||||
else if (likely(pkt->hdr.cmd == REPLY_RX_MPDU_CMD))
|
else if (likely(cmd == WIDE_ID(LEGACY_GROUP, REPLY_RX_MPDU_CMD)))
|
||||||
iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, queue);
|
iwl_mvm_rx_mpdu_mq(mvm, napi, rxb, queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue