aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/xmit.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath9k/xmit.c')
-rw-r--r--drivers/net/wireless/ath9k/xmit.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index ba818cc2fb5c..9fa395418a6c 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -168,7 +168,9 @@ static void fill_min_rates(struct sk_buff *skb, struct ath_tx_control *txctl)
168 168
169 hdr = (struct ieee80211_hdr *)skb->data; 169 hdr = (struct ieee80211_hdr *)skb->data;
170 fc = hdr->frame_control; 170 fc = hdr->frame_control;
171 tx_info_priv = (struct ath_tx_info_priv *)tx_info->driver_data[0]; 171
172 /* XXX: HACK! */
173 tx_info_priv = (struct ath_tx_info_priv *)tx_info->control.vif;
172 174
173 if (ieee80211_is_mgmt(fc) || ieee80211_is_ctl(fc)) { 175 if (ieee80211_is_mgmt(fc) || ieee80211_is_ctl(fc)) {
174 txctl->use_minrate = 1; 176 txctl->use_minrate = 1;
@@ -288,13 +290,16 @@ static int ath_tx_prepare(struct ath_softc *sc,
288 290
289 if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) 291 if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK)
290 txctl->flags |= ATH9K_TXDESC_NOACK; 292 txctl->flags |= ATH9K_TXDESC_NOACK;
291 if (tx_info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) 293
294 if (tx_info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS)
292 txctl->flags |= ATH9K_TXDESC_RTSENA; 295 txctl->flags |= ATH9K_TXDESC_RTSENA;
293 296
294 /* 297 /*
295 * Setup for rate calculations. 298 * Setup for rate calculations.
296 */ 299 */
297 tx_info_priv = (struct ath_tx_info_priv *)tx_info->driver_data[0]; 300
301 /* XXX: HACK! */
302 tx_info_priv = (struct ath_tx_info_priv *)tx_info->control.vif;
298 rcs = tx_info_priv->rcs; 303 rcs = tx_info_priv->rcs;
299 304
300 if (ieee80211_is_data(fc) && !txctl->use_minrate) { 305 if (ieee80211_is_data(fc) && !txctl->use_minrate) {
@@ -855,7 +860,9 @@ static int ath_tx_send_normal(struct ath_softc *sc,
855 860
856 skb = (struct sk_buff *)bf->bf_mpdu; 861 skb = (struct sk_buff *)bf->bf_mpdu;
857 tx_info = IEEE80211_SKB_CB(skb); 862 tx_info = IEEE80211_SKB_CB(skb);
858 tx_info_priv = (struct ath_tx_info_priv *)tx_info->driver_data[0]; 863
864 /* XXX: HACK! */
865 tx_info_priv = (struct ath_tx_info_priv *)tx_info->control.vif;
859 memcpy(bf->bf_rcs, tx_info_priv->rcs, 4 * sizeof(tx_info_priv->rcs[0])); 866 memcpy(bf->bf_rcs, tx_info_priv->rcs, 4 * sizeof(tx_info_priv->rcs[0]));
860 867
861 /* update starting sequence number for subsequent ADDBA request */ 868 /* update starting sequence number for subsequent ADDBA request */
@@ -1249,8 +1256,9 @@ static int ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
1249 } 1256 }
1250 skb = bf->bf_mpdu; 1257 skb = bf->bf_mpdu;
1251 tx_info = IEEE80211_SKB_CB(skb); 1258 tx_info = IEEE80211_SKB_CB(skb);
1252 tx_info_priv = (struct ath_tx_info_priv *) 1259
1253 tx_info->driver_data[0]; 1260 /* XXX: HACK! */
1261 tx_info_priv = (struct ath_tx_info_priv *) tx_info->control.vif;
1254 if (ds->ds_txstat.ts_status & ATH9K_TXERR_FILT) 1262 if (ds->ds_txstat.ts_status & ATH9K_TXERR_FILT)
1255 tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED; 1263 tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
1256 if ((ds->ds_txstat.ts_status & ATH9K_TXERR_FILT) == 0 && 1264 if ((ds->ds_txstat.ts_status & ATH9K_TXERR_FILT) == 0 &&
@@ -1431,7 +1439,8 @@ static int ath_tx_send_ampdu(struct ath_softc *sc,
1431 1439
1432 skb = (struct sk_buff *)bf->bf_mpdu; 1440 skb = (struct sk_buff *)bf->bf_mpdu;
1433 tx_info = IEEE80211_SKB_CB(skb); 1441 tx_info = IEEE80211_SKB_CB(skb);
1434 tx_info_priv = (struct ath_tx_info_priv *)tx_info->driver_data[0]; 1442 /* XXX: HACK! */
1443 tx_info_priv = (struct ath_tx_info_priv *)tx_info->control.vif;
1435 memcpy(bf->bf_rcs, tx_info_priv->rcs, 4 * sizeof(tx_info_priv->rcs[0])); 1444 memcpy(bf->bf_rcs, tx_info_priv->rcs, 4 * sizeof(tx_info_priv->rcs[0]));
1436 1445
1437 /* Add sub-frame to BAW */ 1446 /* Add sub-frame to BAW */
@@ -1466,7 +1475,7 @@ static u32 ath_lookup_rate(struct ath_softc *sc,
1466 skb = (struct sk_buff *)bf->bf_mpdu; 1475 skb = (struct sk_buff *)bf->bf_mpdu;
1467 tx_info = IEEE80211_SKB_CB(skb); 1476 tx_info = IEEE80211_SKB_CB(skb);
1468 tx_info_priv = (struct ath_tx_info_priv *) 1477 tx_info_priv = (struct ath_tx_info_priv *)
1469 tx_info->driver_data[0]; 1478 tx_info->control.vif; /* XXX: HACK! */
1470 memcpy(bf->bf_rcs, 1479 memcpy(bf->bf_rcs,
1471 tx_info_priv->rcs, 4 * sizeof(tx_info_priv->rcs[0])); 1480 tx_info_priv->rcs, 4 * sizeof(tx_info_priv->rcs[0]));
1472 1481
@@ -1927,7 +1936,8 @@ static int ath_tx_start_dma(struct ath_softc *sc,
1927 1936
1928 bf->bf_flags = txctl->flags; 1937 bf->bf_flags = txctl->flags;
1929 bf->bf_keytype = txctl->keytype; 1938 bf->bf_keytype = txctl->keytype;
1930 tx_info_priv = (struct ath_tx_info_priv *)tx_info->driver_data[0]; 1939 /* XXX: HACK! */
1940 tx_info_priv = (struct ath_tx_info_priv *)tx_info->control.vif;
1931 rcs = tx_info_priv->rcs; 1941 rcs = tx_info_priv->rcs;
1932 bf->bf_rcs[0] = rcs[0]; 1942 bf->bf_rcs[0] = rcs[0];
1933 bf->bf_rcs[1] = rcs[1]; 1943 bf->bf_rcs[1] = rcs[1];