From: Arik Nemtsov Date: Sun, 26 Jun 2011 07:36:04 +0000 (+0300) Subject: wl12xx: use 802.11 header location after relocation to frame start X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=fae2fd767e9d380ed0d05e4a5d6b1673e2c2d3df;p=~shefty%2Frdma-dev.git wl12xx: use 802.11 header location after relocation to frame start When operating with TKIP encryption, the function wl1271_tx_fill_hdr() relocates the 802.11 header to the start of the frame, and leaves room for the security header. Some functions in the Tx path rely on the location of the header, namely, for purposes of roaming in STA mode and connecting new stations in AP mode. Call these functions only after the header is relocated. Signed-off-by: Arik Nemtsov Signed-off-by: Luciano Coelho --- diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index 003f9e08691..5c618c5ceda 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c @@ -383,6 +383,8 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct sk_buff *skb, if (ret < 0) return ret; + wl1271_tx_fill_hdr(wl, skb, extra, info, hlid); + if (wl->bss_type == BSS_TYPE_AP_BSS) { wl1271_tx_ap_update_inconnection_sta(wl, skb); wl1271_tx_regulate_link(wl, hlid); @@ -390,8 +392,6 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct sk_buff *skb, wl1271_tx_update_filters(wl, skb); } - wl1271_tx_fill_hdr(wl, skb, extra, info, hlid); - /* * The length of each packet is stored in terms of * words. Thus, we must pad the skb data to make sure its