aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2012-06-14 07:20:18 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2012-06-14 07:44:49 -0400
commitd987dd137bac8dca9b0015763d3106f48bb8a596 (patch)
treeef887505b3c904c548d58ec9bb6f4970a0877042 /drivers/net/wireless/ath/ath6kl
parentc85251f8562095cd6fd63ae786354283c5318303 (diff)
parent211c17aaee644bb808fbdeef547ac99db92c01ed (diff)
Merge remote branch 'wireless-next/master' into ath6kl-next
Conflicts: drivers/net/wireless/ath/ath6kl/cfg80211.c
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c36
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.h3
-rw-r--r--drivers/net/wireless/ath/ath6kl/debug.c42
-rw-r--r--drivers/net/wireless/ath/ath6kl/main.c1
-rw-r--r--drivers/net/wireless/ath/ath6kl/testmode.c5
-rw-r--r--drivers/net/wireless/ath/ath6kl/usb.c1
6 files changed, 25 insertions, 63 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index f00d377343d9..fd7dbd4609df 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2650,35 +2650,6 @@ static int ath6kl_set_ies(struct ath6kl_vif *vif,
2650 return 0; 2650 return 0;
2651} 2651}
2652 2652
2653static int ath6kl_set_channel(struct wiphy *wiphy, struct net_device *dev,
2654 struct ieee80211_channel *chan,
2655 enum nl80211_channel_type channel_type)
2656{
2657 struct ath6kl_vif *vif;
2658
2659 /*
2660 * 'dev' could be NULL if a channel change is required for the hardware
2661 * device itself, instead of a particular VIF.
2662 *
2663 * FIXME: To be handled properly when monitor mode is supported.
2664 */
2665 if (!dev)
2666 return -EBUSY;
2667
2668 vif = netdev_priv(dev);
2669
2670 if (!ath6kl_cfg80211_ready(vif))
2671 return -EIO;
2672
2673 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: center_freq=%u hw_value=%u\n",
2674 __func__, chan->center_freq, chan->hw_value);
2675 vif->next_chan = chan->center_freq;
2676 vif->next_ch_type = channel_type;
2677 vif->next_ch_band = chan->band;
2678
2679 return 0;
2680}
2681
2682void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, bool enable) 2653void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, bool enable)
2683{ 2654{
2684 int err; 2655 int err;
@@ -2886,7 +2857,7 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
2886 p.ssid_len = vif->ssid_len; 2857 p.ssid_len = vif->ssid_len;
2887 memcpy(p.ssid, vif->ssid, vif->ssid_len); 2858 memcpy(p.ssid, vif->ssid, vif->ssid_len);
2888 p.dot11_auth_mode = vif->dot11_auth_mode; 2859 p.dot11_auth_mode = vif->dot11_auth_mode;
2889 p.ch = cpu_to_le16(vif->next_chan); 2860 p.ch = cpu_to_le16(info->channel->center_freq);
2890 2861
2891 /* Enable uAPSD support by default */ 2862 /* Enable uAPSD support by default */
2892 res = ath6kl_wmi_ap_set_apsd(ar->wmi, vif->fw_vif_idx, true); 2863 res = ath6kl_wmi_ap_set_apsd(ar->wmi, vif->fw_vif_idx, true);
@@ -2910,8 +2881,8 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
2910 return res; 2881 return res;
2911 } 2882 }
2912 2883
2913 if (ath6kl_set_htcap(vif, vif->next_ch_band, 2884 if (ath6kl_set_htcap(vif, info->channel->band,
2914 vif->next_ch_type != NL80211_CHAN_NO_HT)) 2885 info->channel_type != NL80211_CHAN_NO_HT))
2915 return -EIO; 2886 return -EIO;
2916 2887
2917 /* 2888 /*
@@ -3392,7 +3363,6 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
3392 .suspend = __ath6kl_cfg80211_suspend, 3363 .suspend = __ath6kl_cfg80211_suspend,
3393 .resume = __ath6kl_cfg80211_resume, 3364 .resume = __ath6kl_cfg80211_resume,
3394#endif 3365#endif
3395 .set_channel = ath6kl_set_channel,
3396 .start_ap = ath6kl_start_ap, 3366 .start_ap = ath6kl_start_ap,
3397 .change_beacon = ath6kl_change_beacon, 3367 .change_beacon = ath6kl_change_beacon,
3398 .stop_ap = ath6kl_stop_ap, 3368 .stop_ap = ath6kl_stop_ap,
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index b3eee10cf016..d38a31de344c 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -577,9 +577,6 @@ struct ath6kl_vif {
577 u32 last_cancel_roc_id; 577 u32 last_cancel_roc_id;
578 u32 send_action_id; 578 u32 send_action_id;
579 bool probe_req_report; 579 bool probe_req_report;
580 u16 next_chan;
581 enum nl80211_channel_type next_ch_type;
582 enum ieee80211_band next_ch_band;
583 u16 assoc_bss_beacon_int; 580 u16 assoc_bss_beacon_int;
584 u16 listen_intvl_t; 581 u16 listen_intvl_t;
585 u16 bmiss_time_t; 582 u16 bmiss_time_t;
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index ced6c6fe5470..15cfe30e54fd 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -217,12 +217,6 @@ void dump_cred_dist_stats(struct htc_target *target)
217 target->credit_info->cur_free_credits); 217 target->credit_info->cur_free_credits);
218} 218}
219 219
220static int ath6kl_debugfs_open(struct inode *inode, struct file *file)
221{
222 file->private_data = inode->i_private;
223 return 0;
224}
225
226void ath6kl_debug_war(struct ath6kl *ar, enum ath6kl_war war) 220void ath6kl_debug_war(struct ath6kl *ar, enum ath6kl_war war)
227{ 221{
228 switch (war) { 222 switch (war) {
@@ -263,7 +257,7 @@ static ssize_t read_file_war_stats(struct file *file, char __user *user_buf,
263 257
264static const struct file_operations fops_war_stats = { 258static const struct file_operations fops_war_stats = {
265 .read = read_file_war_stats, 259 .read = read_file_war_stats,
266 .open = ath6kl_debugfs_open, 260 .open = simple_open,
267 .owner = THIS_MODULE, 261 .owner = THIS_MODULE,
268 .llseek = default_llseek, 262 .llseek = default_llseek,
269}; 263};
@@ -490,7 +484,7 @@ static ssize_t ath6kl_fwlog_mask_write(struct file *file,
490} 484}
491 485
492static const struct file_operations fops_fwlog_mask = { 486static const struct file_operations fops_fwlog_mask = {
493 .open = ath6kl_debugfs_open, 487 .open = simple_open,
494 .read = ath6kl_fwlog_mask_read, 488 .read = ath6kl_fwlog_mask_read,
495 .write = ath6kl_fwlog_mask_write, 489 .write = ath6kl_fwlog_mask_write,
496 .owner = THIS_MODULE, 490 .owner = THIS_MODULE,
@@ -642,7 +636,7 @@ static ssize_t read_file_tgt_stats(struct file *file, char __user *user_buf,
642 636
643static const struct file_operations fops_tgt_stats = { 637static const struct file_operations fops_tgt_stats = {
644 .read = read_file_tgt_stats, 638 .read = read_file_tgt_stats,
645 .open = ath6kl_debugfs_open, 639 .open = simple_open,
646 .owner = THIS_MODULE, 640 .owner = THIS_MODULE,
647 .llseek = default_llseek, 641 .llseek = default_llseek,
648}; 642};
@@ -707,7 +701,7 @@ static ssize_t read_file_credit_dist_stats(struct file *file,
707 701
708static const struct file_operations fops_credit_dist_stats = { 702static const struct file_operations fops_credit_dist_stats = {
709 .read = read_file_credit_dist_stats, 703 .read = read_file_credit_dist_stats,
710 .open = ath6kl_debugfs_open, 704 .open = simple_open,
711 .owner = THIS_MODULE, 705 .owner = THIS_MODULE,
712 .llseek = default_llseek, 706 .llseek = default_llseek,
713}; 707};
@@ -810,7 +804,7 @@ static ssize_t ath6kl_endpoint_stats_write(struct file *file,
810} 804}
811 805
812static const struct file_operations fops_endpoint_stats = { 806static const struct file_operations fops_endpoint_stats = {
813 .open = ath6kl_debugfs_open, 807 .open = simple_open,
814 .read = ath6kl_endpoint_stats_read, 808 .read = ath6kl_endpoint_stats_read,
815 .write = ath6kl_endpoint_stats_write, 809 .write = ath6kl_endpoint_stats_write,
816 .owner = THIS_MODULE, 810 .owner = THIS_MODULE,
@@ -883,7 +877,7 @@ static ssize_t ath6kl_regread_write(struct file *file,
883static const struct file_operations fops_diag_reg_read = { 877static const struct file_operations fops_diag_reg_read = {
884 .read = ath6kl_regread_read, 878 .read = ath6kl_regread_read,
885 .write = ath6kl_regread_write, 879 .write = ath6kl_regread_write,
886 .open = ath6kl_debugfs_open, 880 .open = simple_open,
887 .owner = THIS_MODULE, 881 .owner = THIS_MODULE,
888 .llseek = default_llseek, 882 .llseek = default_llseek,
889}; 883};
@@ -1007,7 +1001,7 @@ static ssize_t ath6kl_lrssi_roam_read(struct file *file,
1007static const struct file_operations fops_lrssi_roam_threshold = { 1001static const struct file_operations fops_lrssi_roam_threshold = {
1008 .read = ath6kl_lrssi_roam_read, 1002 .read = ath6kl_lrssi_roam_read,
1009 .write = ath6kl_lrssi_roam_write, 1003 .write = ath6kl_lrssi_roam_write,
1010 .open = ath6kl_debugfs_open, 1004 .open = simple_open,
1011 .owner = THIS_MODULE, 1005 .owner = THIS_MODULE,
1012 .llseek = default_llseek, 1006 .llseek = default_llseek,
1013}; 1007};
@@ -1069,7 +1063,7 @@ static ssize_t ath6kl_regwrite_write(struct file *file,
1069static const struct file_operations fops_diag_reg_write = { 1063static const struct file_operations fops_diag_reg_write = {
1070 .read = ath6kl_regwrite_read, 1064 .read = ath6kl_regwrite_read,
1071 .write = ath6kl_regwrite_write, 1065 .write = ath6kl_regwrite_write,
1072 .open = ath6kl_debugfs_open, 1066 .open = simple_open,
1073 .owner = THIS_MODULE, 1067 .owner = THIS_MODULE,
1074 .llseek = default_llseek, 1068 .llseek = default_llseek,
1075}; 1069};
@@ -1174,7 +1168,7 @@ static ssize_t ath6kl_roam_table_read(struct file *file, char __user *user_buf,
1174 1168
1175static const struct file_operations fops_roam_table = { 1169static const struct file_operations fops_roam_table = {
1176 .read = ath6kl_roam_table_read, 1170 .read = ath6kl_roam_table_read,
1177 .open = ath6kl_debugfs_open, 1171 .open = simple_open,
1178 .owner = THIS_MODULE, 1172 .owner = THIS_MODULE,
1179 .llseek = default_llseek, 1173 .llseek = default_llseek,
1180}; 1174};
@@ -1212,7 +1206,7 @@ static ssize_t ath6kl_force_roam_write(struct file *file,
1212 1206
1213static const struct file_operations fops_force_roam = { 1207static const struct file_operations fops_force_roam = {
1214 .write = ath6kl_force_roam_write, 1208 .write = ath6kl_force_roam_write,
1215 .open = ath6kl_debugfs_open, 1209 .open = simple_open,
1216 .owner = THIS_MODULE, 1210 .owner = THIS_MODULE,
1217 .llseek = default_llseek, 1211 .llseek = default_llseek,
1218}; 1212};
@@ -1252,7 +1246,7 @@ static ssize_t ath6kl_roam_mode_write(struct file *file,
1252 1246
1253static const struct file_operations fops_roam_mode = { 1247static const struct file_operations fops_roam_mode = {
1254 .write = ath6kl_roam_mode_write, 1248 .write = ath6kl_roam_mode_write,
1255 .open = ath6kl_debugfs_open, 1249 .open = simple_open,
1256 .owner = THIS_MODULE, 1250 .owner = THIS_MODULE,
1257 .llseek = default_llseek, 1251 .llseek = default_llseek,
1258}; 1252};
@@ -1294,7 +1288,7 @@ static ssize_t ath6kl_keepalive_write(struct file *file,
1294} 1288}
1295 1289
1296static const struct file_operations fops_keepalive = { 1290static const struct file_operations fops_keepalive = {
1297 .open = ath6kl_debugfs_open, 1291 .open = simple_open,
1298 .read = ath6kl_keepalive_read, 1292 .read = ath6kl_keepalive_read,
1299 .write = ath6kl_keepalive_write, 1293 .write = ath6kl_keepalive_write,
1300 .owner = THIS_MODULE, 1294 .owner = THIS_MODULE,
@@ -1339,7 +1333,7 @@ static ssize_t ath6kl_disconnect_timeout_write(struct file *file,
1339} 1333}
1340 1334
1341static const struct file_operations fops_disconnect_timeout = { 1335static const struct file_operations fops_disconnect_timeout = {
1342 .open = ath6kl_debugfs_open, 1336 .open = simple_open,
1343 .read = ath6kl_disconnect_timeout_read, 1337 .read = ath6kl_disconnect_timeout_read,
1344 .write = ath6kl_disconnect_timeout_write, 1338 .write = ath6kl_disconnect_timeout_write,
1345 .owner = THIS_MODULE, 1339 .owner = THIS_MODULE,
@@ -1520,7 +1514,7 @@ static ssize_t ath6kl_create_qos_write(struct file *file,
1520 1514
1521static const struct file_operations fops_create_qos = { 1515static const struct file_operations fops_create_qos = {
1522 .write = ath6kl_create_qos_write, 1516 .write = ath6kl_create_qos_write,
1523 .open = ath6kl_debugfs_open, 1517 .open = simple_open,
1524 .owner = THIS_MODULE, 1518 .owner = THIS_MODULE,
1525 .llseek = default_llseek, 1519 .llseek = default_llseek,
1526}; 1520};
@@ -1568,7 +1562,7 @@ static ssize_t ath6kl_delete_qos_write(struct file *file,
1568 1562
1569static const struct file_operations fops_delete_qos = { 1563static const struct file_operations fops_delete_qos = {
1570 .write = ath6kl_delete_qos_write, 1564 .write = ath6kl_delete_qos_write,
1571 .open = ath6kl_debugfs_open, 1565 .open = simple_open,
1572 .owner = THIS_MODULE, 1566 .owner = THIS_MODULE,
1573 .llseek = default_llseek, 1567 .llseek = default_llseek,
1574}; 1568};
@@ -1608,7 +1602,7 @@ static ssize_t ath6kl_bgscan_int_write(struct file *file,
1608 1602
1609static const struct file_operations fops_bgscan_int = { 1603static const struct file_operations fops_bgscan_int = {
1610 .write = ath6kl_bgscan_int_write, 1604 .write = ath6kl_bgscan_int_write,
1611 .open = ath6kl_debugfs_open, 1605 .open = simple_open,
1612 .owner = THIS_MODULE, 1606 .owner = THIS_MODULE,
1613 .llseek = default_llseek, 1607 .llseek = default_llseek,
1614}; 1608};
@@ -1666,7 +1660,7 @@ static ssize_t ath6kl_listen_int_read(struct file *file,
1666static const struct file_operations fops_listen_int = { 1660static const struct file_operations fops_listen_int = {
1667 .read = ath6kl_listen_int_read, 1661 .read = ath6kl_listen_int_read,
1668 .write = ath6kl_listen_int_write, 1662 .write = ath6kl_listen_int_write,
1669 .open = ath6kl_debugfs_open, 1663 .open = simple_open,
1670 .owner = THIS_MODULE, 1664 .owner = THIS_MODULE,
1671 .llseek = default_llseek, 1665 .llseek = default_llseek,
1672}; 1666};
@@ -1726,7 +1720,7 @@ static ssize_t ath6kl_power_params_write(struct file *file,
1726 1720
1727static const struct file_operations fops_power_params = { 1721static const struct file_operations fops_power_params = {
1728 .write = ath6kl_power_params_write, 1722 .write = ath6kl_power_params_write,
1729 .open = ath6kl_debugfs_open, 1723 .open = simple_open,
1730 .owner = THIS_MODULE, 1724 .owner = THIS_MODULE,
1731 .llseek = default_llseek, 1725 .llseek = default_llseek,
1732}; 1726};
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index 45621baca24a..c189e28e86a9 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -602,7 +602,6 @@ static int ath6kl_commit_ch_switch(struct ath6kl_vif *vif, u16 channel)
602 602
603 struct ath6kl *ar = vif->ar; 603 struct ath6kl *ar = vif->ar;
604 604
605 vif->next_chan = channel;
606 vif->profile.ch = cpu_to_le16(channel); 605 vif->profile.ch = cpu_to_le16(channel);
607 606
608 switch (vif->nw_type) { 607 switch (vif->nw_type) {
diff --git a/drivers/net/wireless/ath/ath6kl/testmode.c b/drivers/net/wireless/ath/ath6kl/testmode.c
index 6675c92b542b..acc9aa832f76 100644
--- a/drivers/net/wireless/ath/ath6kl/testmode.c
+++ b/drivers/net/wireless/ath/ath6kl/testmode.c
@@ -55,8 +55,9 @@ void ath6kl_tm_rx_event(struct ath6kl *ar, void *buf, size_t buf_len)
55 ath6kl_warn("failed to allocate testmode rx skb!\n"); 55 ath6kl_warn("failed to allocate testmode rx skb!\n");
56 return; 56 return;
57 } 57 }
58 NLA_PUT_U32(skb, ATH6KL_TM_ATTR_CMD, ATH6KL_TM_CMD_TCMD); 58 if (nla_put_u32(skb, ATH6KL_TM_ATTR_CMD, ATH6KL_TM_CMD_TCMD) ||
59 NLA_PUT(skb, ATH6KL_TM_ATTR_DATA, buf_len, buf); 59 nla_put(skb, ATH6KL_TM_ATTR_DATA, buf_len, buf))
60 goto nla_put_failure;
60 cfg80211_testmode_event(skb, GFP_KERNEL); 61 cfg80211_testmode_event(skb, GFP_KERNEL);
61 return; 62 return;
62 63
diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index dfbbe9e7ff75..3740c3d6ab88 100644
--- a/drivers/net/wireless/ath/ath6kl/usb.c
+++ b/drivers/net/wireless/ath/ath6kl/usb.c
@@ -1191,6 +1191,7 @@ static struct usb_driver ath6kl_usb_driver = {
1191 .disconnect = ath6kl_usb_remove, 1191 .disconnect = ath6kl_usb_remove,
1192 .id_table = ath6kl_usb_ids, 1192 .id_table = ath6kl_usb_ids,
1193 .supports_autosuspend = true, 1193 .supports_autosuspend = true,
1194 .disable_hub_initiated_lpm = 1,
1194}; 1195};
1195 1196
1196static int ath6kl_usb_init(void) 1197static int ath6kl_usb_init(void)