mac80211: make ieee80211_find_sta per virtual interface
[safe/jmp/linux-2.6] / net / mac80211 / rc80211_pid_debugfs.c
index ae75d41..a59043f 100644 (file)
@@ -39,11 +39,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);
 }
 
@@ -85,7 +86,7 @@ static int rate_control_pid_events_open(struct inode *inode, struct file *file)
        struct rc_pid_sta_info *sinfo = inode->i_private;
        struct rc_pid_event_buffer *events = &sinfo->events;
        struct rc_pid_events_file_info *file_info;
-       unsigned int status;
+       unsigned long status;
 
        /* Allocate a state struct */
        file_info = kmalloc(sizeof(*file_info), GFP_KERNEL);
@@ -135,7 +136,7 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf,
        char pb[RC_PID_PRINT_BUF_SIZE];
        int ret;
        int p;
-       unsigned int status;
+       unsigned long status;
 
        /* Check if there is something to read. */
        if (events->next_entry == file_info->next_entry) {
@@ -167,8 +168,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 +198,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,