diff options
author | Sujith Manoharan <Sujith.Manoharan@atheros.com> | 2011-04-13 01:54:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-13 15:22:53 -0400 |
commit | 40dc9e4b86963b77918f1b8fa02b98c1e420a7e1 (patch) | |
tree | 6ea7c12df61b0e0c96a502aabbb9441443637229 /drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |
parent | e723f3900c3b23feb427672c6ccfe5d4243d2c2d (diff) |
ath9k_htc: Use SKB's private area for TX parameters
For all packets sent through the USB_WLAN_TX_PIPE endpoint,
the private area of the SKB's tx_info can be used to store
driver-specific information. For packets sent through USB_REG_OUT_PIPE,
this will not make a difference since they are routed through a
separate routine that doesn't access the private region.
This would help in situations where TX information is required
in the URB callback.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc_drv_txrx.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 7cd3e4e66aa6..ab55dff4721f 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -89,13 +89,16 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, | |||
89 | struct ieee80211_vif *vif = tx_info->control.vif; | 89 | struct ieee80211_vif *vif = tx_info->control.vif; |
90 | struct ath9k_htc_sta *ista; | 90 | struct ath9k_htc_sta *ista; |
91 | struct ath9k_htc_vif *avp = NULL; | 91 | struct ath9k_htc_vif *avp = NULL; |
92 | struct ath9k_htc_tx_ctl tx_ctl; | 92 | struct ath9k_htc_tx_ctl *tx_ctl; |
93 | enum htc_endpoint_id epid; | 93 | enum htc_endpoint_id epid; |
94 | u16 qnum; | 94 | u16 qnum; |
95 | __le16 fc; | 95 | __le16 fc; |
96 | u8 *tx_fhdr; | 96 | u8 *tx_fhdr; |
97 | u8 sta_idx, vif_idx; | 97 | u8 sta_idx, vif_idx; |
98 | 98 | ||
99 | tx_ctl = HTC_SKB_CB(skb); | ||
100 | memset(tx_ctl, 0, sizeof(*tx_ctl)); | ||
101 | |||
99 | hdr = (struct ieee80211_hdr *) skb->data; | 102 | hdr = (struct ieee80211_hdr *) skb->data; |
100 | fc = hdr->frame_control; | 103 | fc = hdr->frame_control; |
101 | 104 | ||
@@ -126,8 +129,6 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, | |||
126 | sta_idx = priv->vif_sta_pos[vif_idx]; | 129 | sta_idx = priv->vif_sta_pos[vif_idx]; |
127 | } | 130 | } |
128 | 131 | ||
129 | memset(&tx_ctl, 0, sizeof(struct ath9k_htc_tx_ctl)); | ||
130 | |||
131 | if (ieee80211_is_data(fc)) { | 132 | if (ieee80211_is_data(fc)) { |
132 | struct tx_frame_hdr tx_hdr; | 133 | struct tx_frame_hdr tx_hdr; |
133 | u32 flags = 0; | 134 | u32 flags = 0; |
@@ -139,10 +140,10 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, | |||
139 | tx_hdr.vif_idx = vif_idx; | 140 | tx_hdr.vif_idx = vif_idx; |
140 | 141 | ||
141 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { | 142 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { |
142 | tx_ctl.type = ATH9K_HTC_AMPDU; | 143 | tx_ctl->type = ATH9K_HTC_AMPDU; |
143 | tx_hdr.data_type = ATH9K_HTC_AMPDU; | 144 | tx_hdr.data_type = ATH9K_HTC_AMPDU; |
144 | } else { | 145 | } else { |
145 | tx_ctl.type = ATH9K_HTC_NORMAL; | 146 | tx_ctl->type = ATH9K_HTC_NORMAL; |
146 | tx_hdr.data_type = ATH9K_HTC_NORMAL; | 147 | tx_hdr.data_type = ATH9K_HTC_NORMAL; |
147 | } | 148 | } |
148 | 149 | ||
@@ -212,7 +213,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, | |||
212 | mgmt->u.probe_resp.timestamp = avp->tsfadjust; | 213 | mgmt->u.probe_resp.timestamp = avp->tsfadjust; |
213 | } | 214 | } |
214 | 215 | ||
215 | tx_ctl.type = ATH9K_HTC_NORMAL; | 216 | tx_ctl->type = ATH9K_HTC_MGMT; |
216 | 217 | ||
217 | mgmt_hdr.node_idx = sta_idx; | 218 | mgmt_hdr.node_idx = sta_idx; |
218 | mgmt_hdr.vif_idx = vif_idx; | 219 | mgmt_hdr.vif_idx = vif_idx; |
@@ -230,7 +231,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, | |||
230 | epid = priv->mgmt_ep; | 231 | epid = priv->mgmt_ep; |
231 | } | 232 | } |
232 | send: | 233 | send: |
233 | return htc_send(priv->htc, skb, epid, &tx_ctl); | 234 | return htc_send(priv->htc, skb, epid); |
234 | } | 235 | } |
235 | 236 | ||
236 | static bool ath9k_htc_check_tx_aggr(struct ath9k_htc_priv *priv, | 237 | static bool ath9k_htc_check_tx_aggr(struct ath9k_htc_priv *priv, |