|
@@ -276,9 +276,9 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb,
|
|
|
wl->session_counter << TX_HW_ATTR_OFST_SESSION_COUNTER;
|
|
|
}
|
|
|
|
|
|
- if (wl->bss_type != BSS_TYPE_AP_BSS) {
|
|
|
- desc->aid = hlid;
|
|
|
+ desc->hlid = hlid;
|
|
|
|
|
|
+ if (wl->bss_type != BSS_TYPE_AP_BSS) {
|
|
|
/* if the packets are destined for AP (have a STA entry)
|
|
|
send them with AP rate policies, otherwise use default
|
|
|
basic rates */
|
|
@@ -287,7 +287,6 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb,
|
|
|
else
|
|
|
rate_idx = ACX_TX_BASIC_RATE;
|
|
|
} else {
|
|
|
- desc->hlid = hlid;
|
|
|
switch (hlid) {
|
|
|
case WL1271_AP_GLOBAL_HLID:
|
|
|
rate_idx = ACX_TX_AP_MODE_MGMT_RATE;
|
|
@@ -375,7 +374,15 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct sk_buff *skb,
|
|
|
if (wl->bss_type == BSS_TYPE_AP_BSS)
|
|
|
hlid = wl1271_tx_get_hlid(skb);
|
|
|
else
|
|
|
- hlid = TX_HW_DEFAULT_AID;
|
|
|
+ if (test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags))
|
|
|
+ hlid = wl->sta_hlid;
|
|
|
+ else
|
|
|
+ hlid = wl->dev_hlid;
|
|
|
+
|
|
|
+ if (hlid == WL12XX_INVALID_LINK_ID) {
|
|
|
+ wl1271_error("invalid hlid. dropping skb 0x%p", skb);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
|
|
|
ret = wl1271_tx_allocate(wl, skb, extra, buf_offset, hlid);
|
|
|
if (ret < 0)
|