Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328378
b: refs/heads/master
c: 3215215
h: refs/heads/master
v: v3
  • Loading branch information
Stone Piao authored and John W. Linville committed Sep 28, 2012
1 parent b9daaac commit a901bc8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a6e231766bdd2e1d228a14af89e36dc190be3a6
refs/heads/master: 3215215a9e7cd8010ba83bbaf75a718aad5aec0d
9 changes: 9 additions & 0 deletions trunk/drivers/net/wireless/mwifiex/uap_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,16 @@ void *mwifiex_process_uap_txpd(struct mwifiex_private *priv,
struct uap_txpd *txpd;
struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb);
int pad, len;
u16 pkt_type;

if (!skb->len) {
dev_err(adapter->dev, "Tx: bad packet length: %d\n", skb->len);
tx_info->status_code = -1;
return skb->data;
}

pkt_type = mwifiex_is_skb_mgmt_frame(skb) ? PKT_TYPE_MGMT : 0;

/* If skb->data is not aligned, add padding */
pad = (4 - (((void *)skb->data - NULL) & 0x3)) % 4;

Expand Down Expand Up @@ -318,6 +321,12 @@ void *mwifiex_process_uap_txpd(struct mwifiex_private *priv,
cpu_to_le32(priv->wmm.user_pri_pkt_tx_ctrl[txpd->priority]);

/* Offset of actual data */
if (pkt_type == PKT_TYPE_MGMT) {
/* Set the packet type and add header for management frame */
txpd->tx_pkt_type = cpu_to_le16(pkt_type);
len += MWIFIEX_MGMT_FRAME_HEADER_SIZE;
}

txpd->tx_pkt_offset = cpu_to_le16(len);

/* make space for INTF_HEADER_LEN */
Expand Down

0 comments on commit a901bc8

Please sign in to comment.