diff options
author | Ajitpal.Singh <ajitpal.singh@stericsson.com> | 2011-09-21 16:56:14 +0530 |
---|---|---|
committer | Philippe LANGLAIS <philippe.langlais@stericsson.com> | 2011-10-13 10:26:09 +0200 |
commit | 1cd0b078e3beff5a4c5b6dfe134e38653f4f0483 (patch) | |
tree | 16b5cdef6eb238a797a77ce8c3b7c1f47817ecf4 /drivers/staging/cw1200/wsm.c | |
parent | 744a76525819adfe1b1652d465664e5a380ce29c (diff) |
cw1200: Add 2byte hole in TXreq for unaligned buf
Adds a 2 bytes hole in the WSM Transmit request when skb->data is
aligned at 2 bytes.This will make the transmit request 4byte aligned.
This optmisation is need for DMA.
The firmware is informed about the hole by setting BIT7 in the
WSM Transmit Request flags.
ST-Ericsson ID: 357764
ST-Ericsson FOSS-OUT ID: NA
Change-Id: Idbb60459ca645575c2afc74f2421b0fa86121cf0
Signed-off-by: Ajitpal.Singh <ajitpal.singh@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33668
Tested-by: Dmitry TARNYAGIN <dmitry.tarnyagin@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers/staging/cw1200/wsm.c')
-rw-r--r-- | drivers/staging/cw1200/wsm.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/staging/cw1200/wsm.c b/drivers/staging/cw1200/wsm.c index 10303fae3c8..295b13f5676 100644 --- a/drivers/staging/cw1200/wsm.c +++ b/drivers/staging/cw1200/wsm.c @@ -1313,12 +1313,12 @@ out: static bool wsm_handle_tx_data(struct cw1200_common *priv, const struct wsm_tx *wsm, const struct ieee80211_tx_info *tx_info, - struct cw1200_queue *queue, - int link_id) + const struct cw1200_txpriv *txpriv, + struct cw1200_queue *queue) { bool handled = false; const struct ieee80211_hdr *frame = - (struct ieee80211_hdr *)&wsm[1]; + (struct ieee80211_hdr *) &((u8 *)wsm)[txpriv->offset]; __le16 fctl = frame->frame_control; enum { doProbe, @@ -1349,7 +1349,7 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv, case NL80211_IFTYPE_AP: if (unlikely(!priv->join_status)) action = doDrop; - else if (unlikely(!(BIT(link_id) & + else if (unlikely(!(BIT(txpriv->raw_link_id) & (BIT(0) | priv->link_id_map)))) { wiphy_warn(priv->hw->wiphy, "A frame with expired link id " @@ -1396,7 +1396,6 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv, switch (action) { case doProbe: { - const struct cw1200_txpriv *txpriv; /* An interesting FW "feature". Device filters * probe responses. * The easiest way to get it back is to convert @@ -1619,8 +1618,7 @@ int wsm_get_tx(struct cw1200_common *priv, u8 **data, continue; if (wsm_handle_tx_data(priv, wsm, - tx_info, queue, - txpriv->raw_link_id)) + tx_info, txpriv, queue)) continue; /* Handled by WSM */ wsm->hdr.id &= __cpu_to_le16( @@ -1635,7 +1633,8 @@ int wsm_get_tx(struct cw1200_common *priv, u8 **data, if (more) { struct ieee80211_hdr *hdr = - (struct ieee80211_hdr *) &wsm[1]; + (struct ieee80211_hdr *) + &((u8 *)wsm)[txpriv->offset]; /* more buffered multicast/broadcast frames * ==> set MoreData flag in IEEE 802.11 header * to inform PS STAs */ |