예제 #1
0
/*
 * ath9k version of ieee80211_tx_status() for TX frames that are generated
 * internally in the driver.
 */
void ath9k_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
{
	struct ath_wiphy *aphy = hw->priv;
	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
	struct ath_tx_info_priv *tx_info_priv = ATH_TX_INFO_PRIV(tx_info);

	if (tx_info_priv && tx_info_priv->frame_type == ATH9K_INT_PAUSE &&
	    aphy->state == ATH_WIPHY_PAUSING) {
		if (!(info->flags & IEEE80211_TX_STAT_ACK)) {
			printk(KERN_DEBUG "ath9k: %s: no ACK for pause "
			       "frame\n", wiphy_name(hw->wiphy));
			/*
			 * The AP did not reply; ignore this to allow us to
			 * continue.
			 */
		}
		aphy->state = ATH_WIPHY_PAUSED;
		if (!ath9k_wiphy_pausing(aphy->sc)) {
			/*
			 * Drop from tasklet to work to allow mutex for channel
			 * change.
			 */
			queue_work(aphy->sc->hw->workqueue,
				   &aphy->sc->chan_work);
		}
	}

	kfree(tx_info_priv);
	tx_info->rate_driver_data[0] = NULL;

	dev_kfree_skb(skb);
}
예제 #2
0
void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb)
{
    struct ath_tx_info_priv *tx_info_priv = NULL;
    struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
    struct ieee80211_tx_rate *rates = tx_info->status.rates;
    int final_ts_idx, idx;
    struct ath_rc_stats *stats;

    tx_info_priv = ATH_TX_INFO_PRIV(tx_info);
    final_ts_idx = tx_info_priv->tx.ts_rateindex;
    idx = rates[final_ts_idx].idx;
    stats = &sc->debug.stats.rcstats[idx];
    stats->success++;
}