Skip to content

Commit

Permalink
iwlwifi: mvm: fix A-MPDU reference assignment
Browse files Browse the repository at this point in the history
[ Upstream commit 1f7698a ]

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: Danny Alexander <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Fixes: fbe4112 ("iwlwifi: mvm: update mpdu metadata API")
Signed-off-by: Luca Coelho <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
jmberg-intel authored and gregkh committed Jan 27, 2020
1 parent 1abaee5 commit f401472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,12 +871,12 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
bool toggle_bit = phy_info & IWL_RX_MPDU_PHY_AMPDU_TOGGLE;

rx_status->flag |= RX_FLAG_AMPDU_DETAILS;
rx_status->ampdu_reference = mvm->ampdu_ref;
/* toggle is switched whenever new aggregation starts */
if (toggle_bit != mvm->ampdu_toggle) {
mvm->ampdu_ref++;
mvm->ampdu_toggle = toggle_bit;
}
rx_status->ampdu_reference = mvm->ampdu_ref;
}

rcu_read_lock();
Expand Down

0 comments on commit f401472

Please sign in to comment.