diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-10-25 19:34:20 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-11-11 12:58:52 +0200 |
commit | 990bd9151927ad55c7e3da3b05cf13ecfe7a31bf (patch) | |
tree | 18c730d33aea2b373b1ddb8c638220f1bd32dd92 /drivers/net/wireless/ath/ath6kl/debug.c | |
parent | 478ac0272154023abb813db7ae12dc380caeb68e (diff) | |
download | talos-obmc-linux-990bd9151927ad55c7e3da3b05cf13ecfe7a31bf.tar.gz talos-obmc-linux-990bd9151927ad55c7e3da3b05cf13ecfe7a31bf.zip |
ath6kl: Maintain virtual interface in a list
This patch removes all references to ar->vif and takes
vif from a list.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index 54faa6b39e9a..e515c83e3795 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c @@ -397,15 +397,20 @@ static ssize_t read_file_tgt_stats(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct ath6kl *ar = file->private_data; - /* TODO: Findout vif */ - struct ath6kl_vif *vif = ar->vif; - struct target_stats *tgt_stats = &vif->target_stats; + struct ath6kl_vif *vif; + struct target_stats *tgt_stats; char *buf; unsigned int len = 0, buf_len = 1500; int i; long left; ssize_t ret_cnt; + vif = ath6kl_vif_first(ar); + if (!vif) + return -EIO; + + tgt_stats = &vif->target_stats; + buf = kzalloc(buf_len, GFP_KERNEL); if (!buf) return -ENOMEM; @@ -1249,8 +1254,7 @@ static ssize_t ath6kl_create_qos_write(struct file *file, { struct ath6kl *ar = file->private_data; - /* TODO: Findout vif */ - struct ath6kl_vif *vif = ar->vif; + struct ath6kl_vif *vif; char buf[100]; ssize_t len; char *sptr, *token; @@ -1258,6 +1262,10 @@ static ssize_t ath6kl_create_qos_write(struct file *file, u32 val32; u16 val16; + vif = ath6kl_vif_first(ar); + if (!vif) + return -EIO; + len = min(count, sizeof(buf) - 1); if (copy_from_user(buf, user_buf, len)) return -EFAULT; @@ -1423,14 +1431,17 @@ static ssize_t ath6kl_delete_qos_write(struct file *file, { struct ath6kl *ar = file->private_data; - /* TODO: Findout vif */ - struct ath6kl_vif *vif = ar->vif; + struct ath6kl_vif *vif; char buf[100]; ssize_t len; char *sptr, *token; u8 traffic_class; u8 tsid; + vif = ath6kl_vif_first(ar); + if (!vif) + return -EIO; + len = min(count, sizeof(buf) - 1); if (copy_from_user(buf, user_buf, len)) return -EFAULT; |