Skip to content

Commit b183878

Browse files
ryderlee1110nbd168
authored andcommitted
mt76: use macro for sn and seq_ctrl conversion
Use macro to convert sn and seq_ctrl for better readability. Signed-off-by: Roy Luo <[email protected]> Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
1 parent 6edf074 commit b183878

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/net/wireless/mediatek/mt76/agg-rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames)
135135
return;
136136

137137
status->tid = le16_to_cpu(bar->control) >> 12;
138-
seqno = le16_to_cpu(bar->start_seq_num) >> 4;
138+
seqno = IEEE80211_SEQ_TO_SN(le16_to_cpu(bar->start_seq_num));
139139
tid = rcu_dereference(wcid->aggr[status->tid]);
140140
if (!tid)
141141
return;

drivers/net/wireless/mediatek/mt76/mt7603/mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb)
590590
status->aggr = unicast &&
591591
!ieee80211_is_qos_nullfunc(hdr->frame_control);
592592
status->tid = *ieee80211_get_qos_ctl(hdr) & IEEE80211_QOS_CTL_TID_MASK;
593-
status->seqno = hdr->seq_ctrl >> 4;
593+
status->seqno = IEEE80211_SEQ_TO_SN(hdr->seq_ctrl);
594594

595595
return 0;
596596
}

drivers/net/wireless/mediatek/mt76/mt7603/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ mt7603_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
593593
mt7603_mac_tx_ba_reset(dev, msta->wcid.idx, tid, -1);
594594
break;
595595
case IEEE80211_AMPDU_TX_START:
596-
mtxq->agg_ssn = *ssn << 4;
596+
mtxq->agg_ssn = IEEE80211_SN_TO_SEQ(*ssn);
597597
ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
598598
break;
599599
case IEEE80211_AMPDU_TX_STOP_CONT:

drivers/net/wireless/mediatek/mt76/mt76x02_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ int mt76x02_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
378378
ieee80211_send_bar(vif, sta->addr, tid, mtxq->agg_ssn);
379379
break;
380380
case IEEE80211_AMPDU_TX_START:
381-
mtxq->agg_ssn = *ssn << 4;
381+
mtxq->agg_ssn = IEEE80211_SN_TO_SEQ(*ssn);
382382
ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
383383
break;
384384
case IEEE80211_AMPDU_TX_STOP_CONT:

0 commit comments

Comments
 (0)