提交 59d29768 编写于 作者: J Johannes Berg 提交者: Yang Yingliang

iwlwifi: mvm: fix A-MPDU reference assignment

[ Upstream commit 1f7698abedeeb3fef3cbcf78e16f925df675a179 ]

The current code assigns the reference, and then goes to increment
it if the toggle bit has changed. That way, we get

Toggle  0  0  0  0  1  1  1  1
ID      1  1  1  1  1  2  2  2

Fix that by assigning the post-toggle ID to get

Toggle  0  0  0  0  1  1  1  1
ID      1  1  1  1  2  2  2  2
Reported-by: NDanny Alexander <danny.alexander@intel.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Fixes: fbe41127 ("iwlwifi: mvm: update mpdu metadata API")
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 ec11f255
...@@ -1077,7 +1077,6 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, ...@@ -1077,7 +1077,6 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
he_phy_data = le64_to_cpu(desc->v1.he_phy_data); he_phy_data = le64_to_cpu(desc->v1.he_phy_data);
rx_status->flag |= RX_FLAG_AMPDU_DETAILS; rx_status->flag |= RX_FLAG_AMPDU_DETAILS;
rx_status->ampdu_reference = mvm->ampdu_ref;
/* toggle is switched whenever new aggregation starts */ /* toggle is switched whenever new aggregation starts */
if (toggle_bit != mvm->ampdu_toggle) { if (toggle_bit != mvm->ampdu_toggle) {
mvm->ampdu_ref++; mvm->ampdu_ref++;
...@@ -1092,6 +1091,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, ...@@ -1092,6 +1091,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
RX_FLAG_AMPDU_EOF_BIT; RX_FLAG_AMPDU_EOF_BIT;
} }
} }
rx_status->ampdu_reference = mvm->ampdu_ref;
} }
rcu_read_lock(); rcu_read_lock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册