diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2010-04-26 05:39:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-27 16:09:15 -0400 |
commit | d439260e04eca5bce88558feecee4369784f2175 (patch) | |
tree | a759baf9a4d038f340845b6b689a96098c19a833 /drivers | |
parent | 5bf1e17a4a3870d4f03dc39f1bec4464bbdf4887 (diff) |
ath9k_htc: Validate TX Endpoint ID
Check for the endpoint IDs when processing
TX completions and drop the unsupported EPIDs.
We can add other endpoints (UAPSD,..) when support
is added.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 2c3c51007dd3..08bfe5d81c17 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -244,16 +244,25 @@ void ath9k_htc_txep(void *drv_priv, struct sk_buff *skb, | |||
244 | enum htc_endpoint_id ep_id, bool txok) | 244 | enum htc_endpoint_id ep_id, bool txok) |
245 | { | 245 | { |
246 | struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) drv_priv; | 246 | struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) drv_priv; |
247 | struct ath_common *common = ath9k_hw_common(priv->ah); | ||
247 | struct ieee80211_tx_info *tx_info; | 248 | struct ieee80211_tx_info *tx_info; |
248 | 249 | ||
249 | if (!skb) | 250 | if (!skb) |
250 | return; | 251 | return; |
251 | 252 | ||
252 | if (ep_id == priv->mgmt_ep) | 253 | if (ep_id == priv->mgmt_ep) { |
253 | skb_pull(skb, sizeof(struct tx_mgmt_hdr)); | 254 | skb_pull(skb, sizeof(struct tx_mgmt_hdr)); |
254 | else | 255 | } else if ((ep_id == priv->data_bk_ep) || |
255 | /* TODO: Check for cab/uapsd/data */ | 256 | (ep_id == priv->data_be_ep) || |
257 | (ep_id == priv->data_vi_ep) || | ||
258 | (ep_id == priv->data_vo_ep)) { | ||
256 | skb_pull(skb, sizeof(struct tx_frame_hdr)); | 259 | skb_pull(skb, sizeof(struct tx_frame_hdr)); |
260 | } else { | ||
261 | ath_print(common, ATH_DBG_FATAL, | ||
262 | "Unsupported TX EPID: %d\n", ep_id); | ||
263 | dev_kfree_skb_any(skb); | ||
264 | return; | ||
265 | } | ||
257 | 266 | ||
258 | tx_info = IEEE80211_SKB_CB(skb); | 267 | tx_info = IEEE80211_SKB_CB(skb); |
259 | 268 | ||