mac80211: fix propagation of failed hardware reconfigurations
[safe/jmp/linux-2.6] / net / mac80211 / rc80211_pid_debugfs.c
index ff5c380..4566705 100644 (file)
@@ -6,6 +6,7 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/sched.h>
 #include <linux/spinlock.h>
 #include <linux/poll.h>
 #include <linux/netdevice.h>
@@ -39,11 +40,12 @@ static void rate_control_pid_event(struct rc_pid_event_buffer *buf,
 }
 
 void rate_control_pid_event_tx_status(struct rc_pid_event_buffer *buf,
-                                            struct ieee80211_tx_status *stat)
+                                     struct ieee80211_tx_info *stat)
 {
        union rc_pid_event_data evd;
 
-       memcpy(&evd.tx_status, stat, sizeof(struct ieee80211_tx_status));
+       evd.flags = stat->flags;
+       memcpy(&evd.tx_status, stat, sizeof(struct ieee80211_tx_info));
        rate_control_pid_event(buf, RC_PID_EVENT_TYPE_TX_STATUS, &evd);
 }
 
@@ -167,8 +169,8 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf,
        switch (ev->type) {
        case RC_PID_EVENT_TYPE_TX_STATUS:
                p += snprintf(pb + p, length - p, "tx_status %u %u",
-                             ev->data.tx_status.excessive_retries,
-                             ev->data.tx_status.retry_count);
+                             !(ev->data.flags & IEEE80211_TX_STAT_ACK),
+                             ev->data.tx_status.status.rates[0].idx);
                break;
        case RC_PID_EVENT_TYPE_RATE_CHANGE:
                p += snprintf(pb + p, length - p, "rate_change %d %d",
@@ -197,7 +199,7 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf,
 
 #undef RC_PID_PRINT_BUF_SIZE
 
-static struct file_operations rc_pid_fop_events = {
+static const struct file_operations rc_pid_fop_events = {
        .owner = THIS_MODULE,
        .read = rate_control_pid_events_read,
        .poll = rate_control_pid_events_poll,