Skip to content

Commit

Permalink
wlcore: use basic rates for non-data packets
Browse files Browse the repository at this point in the history
After the latest mac80211 changes, the sta has
the ap's sta pointer even before association.

This cause the auth and assoc frames to be sent
with the standard ap's rates, rather than the
basic rates.

Change the tx rate policy logic to use the regular
ap rates only for data packets (so control and mgmt
packets will be sent with basic rates)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Jul 18, 2012
1 parent 42066f9 commit 4340d1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ti/wlcore/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif,
rate_idx = 0;
else if (wlvif->bss_type != BSS_TYPE_AP_BSS) {
/*
* if the packets are destined for AP (have a STA entry)
* if the packets are data packets
* send them with AP rate policies (EAPOLs are an exception),
* otherwise use default basic rates
*/
if (skb->protocol == cpu_to_be16(ETH_P_PAE))
rate_idx = wlvif->sta.basic_rate_idx;
else if (control->flags & IEEE80211_TX_CTL_NO_CCK_RATE)
rate_idx = wlvif->sta.p2p_rate_idx;
else if (control->control.sta)
else if (ieee80211_is_data(frame_control))
rate_idx = wlvif->sta.ap_rate_idx;
else
rate_idx = wlvif->sta.basic_rate_idx;
Expand Down

0 comments on commit 4340d1c

Please sign in to comment.