diff options
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/11n_aggr.c b/drivers/net/wireless/marvell/mwifiex/11n_aggr.c index c47d6366875d..a75013ac84d7 100644 --- a/drivers/net/wireless/marvell/mwifiex/11n_aggr.c +++ b/drivers/net/wireless/marvell/mwifiex/11n_aggr.c | |||
@@ -101,13 +101,6 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv, | |||
101 | { | 101 | { |
102 | struct txpd *local_tx_pd; | 102 | struct txpd *local_tx_pd; |
103 | struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb); | 103 | struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb); |
104 | unsigned int pad; | ||
105 | int headroom = (priv->adapter->iface_type == | ||
106 | MWIFIEX_USB) ? 0 : INTF_HEADER_LEN; | ||
107 | |||
108 | pad = ((void *)skb->data - sizeof(*local_tx_pd) - | ||
109 | headroom - NULL) & (MWIFIEX_DMA_ALIGN_SZ - 1); | ||
110 | skb_push(skb, pad); | ||
111 | 104 | ||
112 | skb_push(skb, sizeof(*local_tx_pd)); | 105 | skb_push(skb, sizeof(*local_tx_pd)); |
113 | 106 | ||
@@ -121,12 +114,10 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv, | |||
121 | local_tx_pd->bss_num = priv->bss_num; | 114 | local_tx_pd->bss_num = priv->bss_num; |
122 | local_tx_pd->bss_type = priv->bss_type; | 115 | local_tx_pd->bss_type = priv->bss_type; |
123 | /* Always zero as the data is followed by struct txpd */ | 116 | /* Always zero as the data is followed by struct txpd */ |
124 | local_tx_pd->tx_pkt_offset = cpu_to_le16(sizeof(struct txpd) + | 117 | local_tx_pd->tx_pkt_offset = cpu_to_le16(sizeof(struct txpd)); |
125 | pad); | ||
126 | local_tx_pd->tx_pkt_type = cpu_to_le16(PKT_TYPE_AMSDU); | 118 | local_tx_pd->tx_pkt_type = cpu_to_le16(PKT_TYPE_AMSDU); |
127 | local_tx_pd->tx_pkt_length = cpu_to_le16(skb->len - | 119 | local_tx_pd->tx_pkt_length = cpu_to_le16(skb->len - |
128 | sizeof(*local_tx_pd) - | 120 | sizeof(*local_tx_pd)); |
129 | pad); | ||
130 | 121 | ||
131 | if (tx_info->flags & MWIFIEX_BUF_FLAG_TDLS_PKT) | 122 | if (tx_info->flags & MWIFIEX_BUF_FLAG_TDLS_PKT) |
132 | local_tx_pd->flags |= MWIFIEX_TXPD_FLAGS_TDLS_PACKET; | 123 | local_tx_pd->flags |= MWIFIEX_TXPD_FLAGS_TDLS_PACKET; |
@@ -190,7 +181,11 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv, | |||
190 | ra_list_flags); | 181 | ra_list_flags); |
191 | return -1; | 182 | return -1; |
192 | } | 183 | } |
193 | skb_reserve(skb_aggr, MWIFIEX_MIN_DATA_HEADER_LEN); | 184 | |
185 | /* skb_aggr->data already 64 byte align, just reserve bus interface | ||
186 | * header and txpd. | ||
187 | */ | ||
188 | skb_reserve(skb_aggr, headroom + sizeof(struct txpd)); | ||
194 | tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr); | 189 | tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr); |
195 | 190 | ||
196 | memset(tx_info_aggr, 0, sizeof(*tx_info_aggr)); | 191 | memset(tx_info_aggr, 0, sizeof(*tx_info_aggr)); |