diff options
author | Stone Piao <piaoyun@marvell.com> | 2012-09-25 23:23:44 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-09-28 13:54:06 -0400 |
commit | 3215215a9e7cd8010ba83bbaf75a718aad5aec0d (patch) | |
tree | b3dcc4a6ae9ae180c8723d870f2a7f6917bffff0 | |
parent | 8a6e231766bdd2e1d228a14af89e36dc190be3a6 (diff) |
mwifiex: set txpd when send a mgmt frame for AP and GO mode
Set packet type and packet offset in txpd when send a mgmt frame
in AP and GO mode.
Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Kevin Gan <ganhy@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/mwifiex/uap_txrx.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/uap_txrx.c b/drivers/net/wireless/mwifiex/uap_txrx.c index 012c1433d126..0966ac24b3b4 100644 --- a/drivers/net/wireless/mwifiex/uap_txrx.c +++ b/drivers/net/wireless/mwifiex/uap_txrx.c | |||
@@ -284,6 +284,7 @@ void *mwifiex_process_uap_txpd(struct mwifiex_private *priv, | |||
284 | struct uap_txpd *txpd; | 284 | struct uap_txpd *txpd; |
285 | struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb); | 285 | struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb); |
286 | int pad, len; | 286 | int pad, len; |
287 | u16 pkt_type; | ||
287 | 288 | ||
288 | if (!skb->len) { | 289 | if (!skb->len) { |
289 | dev_err(adapter->dev, "Tx: bad packet length: %d\n", skb->len); | 290 | dev_err(adapter->dev, "Tx: bad packet length: %d\n", skb->len); |
@@ -291,6 +292,8 @@ void *mwifiex_process_uap_txpd(struct mwifiex_private *priv, | |||
291 | return skb->data; | 292 | return skb->data; |
292 | } | 293 | } |
293 | 294 | ||
295 | pkt_type = mwifiex_is_skb_mgmt_frame(skb) ? PKT_TYPE_MGMT : 0; | ||
296 | |||
294 | /* If skb->data is not aligned, add padding */ | 297 | /* If skb->data is not aligned, add padding */ |
295 | pad = (4 - (((void *)skb->data - NULL) & 0x3)) % 4; | 298 | pad = (4 - (((void *)skb->data - NULL) & 0x3)) % 4; |
296 | 299 | ||
@@ -318,6 +321,12 @@ void *mwifiex_process_uap_txpd(struct mwifiex_private *priv, | |||
318 | cpu_to_le32(priv->wmm.user_pri_pkt_tx_ctrl[txpd->priority]); | 321 | cpu_to_le32(priv->wmm.user_pri_pkt_tx_ctrl[txpd->priority]); |
319 | 322 | ||
320 | /* Offset of actual data */ | 323 | /* Offset of actual data */ |
324 | if (pkt_type == PKT_TYPE_MGMT) { | ||
325 | /* Set the packet type and add header for management frame */ | ||
326 | txpd->tx_pkt_type = cpu_to_le16(pkt_type); | ||
327 | len += MWIFIEX_MGMT_FRAME_HEADER_SIZE; | ||
328 | } | ||
329 | |||
321 | txpd->tx_pkt_offset = cpu_to_le16(len); | 330 | txpd->tx_pkt_offset = cpu_to_le16(len); |
322 | 331 | ||
323 | /* make space for INTF_HEADER_LEN */ | 332 | /* make space for INTF_HEADER_LEN */ |