mac80211: sync with changes to patches submitted upstream
authorFelix Fietkau <nbd@openwrt.org>
Sun, 15 Nov 2009 21:21:47 +0000 (21:21 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 15 Nov 2009 21:21:47 +0000 (21:21 +0000)
SVN-Revision: 18427

package/mac80211/patches/520-driver_flags.patch
package/mac80211/patches/530-ath9k_cleanup.patch

index 2dc2092b1a033e2dead6baea7a1c7d0437da7e6a..d27c502ec215815e3c4c029772d968695dd6d22a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -386,11 +386,12 @@ struct ieee80211_tx_rate {
+@@ -386,14 +386,17 @@ struct ieee80211_tx_rate {
   * @flags: transmit info flags, defined above
   * @band: the band to transmit on (use for checking for races)
   * @antenna_sel_tx: antenna to use, 0 for automatic diversity
   * @status: union for status data
   * @driver_data: array of driver_data pointers
 - * @ampdu_ack_len: number of aggregated frames.
+- *    relevant only if IEEE80211_TX_STATUS_AMPDU was set.
 + * @ampdu_ack_len: number of acked aggregated frames.
-  *    relevant only if IEEE80211_TX_STATUS_AMPDU was set.
++ *    relevant only if ieee80211_tx_status_ampdu was set.
   * @ampdu_ack_map: block ack bit map for the aggregation.
   *    relevant only if IEEE80211_TX_STATUS_AMPDU was set.
-@@ -403,8 +404,8 @@ struct ieee80211_tx_info {
++ * @ampdu_len: number of aggregated frames.
++ *    relevant only if ieee80211_tx_status_ampdu was set.
+  * @ack_signal: signal strength of the ACK frame
+  */
+ struct ieee80211_tx_info {
+@@ -403,8 +406,8 @@ struct ieee80211_tx_info {
  
        u8 antenna_sel_tx;
  
 -      /* 2 byte hole */
 -      u8 pad[2];
 +      u8 driver_flags;
-+      u8 ampdu_len;
++      u8 pad;
  
        union {
                struct {
+@@ -428,7 +431,8 @@ struct ieee80211_tx_info {
+                       u8 ampdu_ack_len;
+                       u64 ampdu_ack_map;
+                       int ack_signal;
+-                      /* 8 bytes free */
++                      u8 ampdu_len;
++                      /* 7 bytes free */
+               } status;
+               struct {
+                       struct ieee80211_tx_rate driver_rates[
index 49a1143ab0ccaa2e40b02b036e1d74dcf86290aa..e16ccf1e241efd4b78e6473f4e4d4f15c9587039 100644 (file)
 +                      if ((ds->ds_txstat.ts_status & ATH9K_TXERR_XRETRY) ||
 +                          (ds->ds_txstat.ts_status & ATH9K_TXERR_FIFO))
 +                              tx_info->driver_flags |= ATH_TX_INFO_XRETRY;
-+                      tx_info->ampdu_len = bf->bf_nframes;
++                      tx_info->status.ampdu_len = bf->bf_nframes;
 +                      tx_info->status.ampdu_ack_len = bf->bf_nframes - nbad;
                }
        }
        };
  
        last_per = ath_rc_priv->per[tx_rate];
-+      n_bad_frames = tx_info->ampdu_len - tx_info->status.ampdu_ack_len;
++      n_bad_frames = tx_info->status.ampdu_len - tx_info->status.ampdu_ack_len;
  
        if (xretries) {
                if (xretries == 1) {
                         */
 -                      if (tx_info_priv->n_frames > 0) {
 -                              int n_frames, n_bad_frames;
-+                      if (tx_info->ampdu_len > 0) {
++                      if (tx_info->status.ampdu_len > 0) {
 +                              int n_frames, n_bad_tries;
                                u8 cur_per, new_per;
  
 -                                      tx_info_priv->n_bad_frames;
 -                              n_frames = tx_info_priv->n_frames * (retries + 1);
 -                              cur_per = (100 * n_bad_frames / n_frames) >> 3;
-+                              n_bad_tries = retries * tx_info->ampdu_len +
++                              n_bad_tries = retries * tx_info->status.ampdu_len +
 +                                      n_bad_frames;
-+                              n_frames = tx_info->ampdu_len * (retries + 1);
++                              n_frames = tx_info->status.ampdu_len * (retries + 1);
 +                              cur_per = (100 * n_bad_tries / n_frames) >> 3;
                                new_per = (u8)(last_per - (last_per >> 3) + cur_per);
                                ath_rc_priv->per[tx_rate] = new_per;
                if (ath_rc_priv->probe_rate && ath_rc_priv->probe_rate == tx_rate) {
 -                      if (retries > 0 || 2 * tx_info_priv->n_bad_frames >
 -                              tx_info_priv->n_frames) {
-+                      if (retries > 0 || 2 * n_bad_frames > tx_info->ampdu_len) {
++                      if (retries > 0 || 2 * n_bad_frames > tx_info->status.ampdu_len) {
                                /*
                                 * Since we probed with just a single attempt,
                                 * any retries means the probe failed.  Also,