/* format outgoing BA */
ba->frame_control = cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK);
ba->duration = cpu_to_le16(0);
- memcpy(ba->ta, ctx->ta, 6);
- memcpy(ba->ra, ctx->ra, 6);
+
+ /* the BAR contains all necessary MACs. All we need is to swap them */
+ memcpy(ba->ra, ctx->ta, 6);
+ memcpy(ba->ta, ctx->ra, 6);
/*
* Unfortunately, we cannot look into the hardware's scoreboard.
*/
memset(ba->bitmap, 0x0, sizeof(ba->bitmap));
- ba->control = ctx->control;
+ /*
+ * Both, the original firmare and ath9k set the NO ACK flag in
+ * the BA Ack Policy subfield.
+ */
+ ba->control = ctx->control | cpu_to_le16(1);
ba->start_seq_num = ctx->start_seq_num;
wlan_tx_fw(&baf->s, NULL);
}
ctx = wlan_get_bar_cache_buffer();
- /* Brilliant! The BAR provides all necessary MACs! */
- memcpy(ctx->ra, bar->ta, 6);
- memcpy(ctx->ta, bar->ra, 6);
+ memcpy(ctx->ra, bar->ra, 6);
+ memcpy(ctx->ta, bar->ta, 6);
ctx->control = bar->control;
ctx->start_seq_num = bar->start_seq_num;
}