diff options
Diffstat (limited to 'drivers/net/wireless/ath/wil6210')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/debugfs.c | 45 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/main.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/p2p.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wil6210.h | 2 |
4 files changed, 10 insertions, 56 deletions
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c index 6db00c167d2e..e58dc6dc1f9c 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c @@ -1048,50 +1048,6 @@ static const struct file_operations fops_bf = { .llseek = seq_lseek, }; -/*---------SSID------------*/ -static ssize_t wil_read_file_ssid(struct file *file, char __user *user_buf, - size_t count, loff_t *ppos) -{ - struct wil6210_priv *wil = file->private_data; - struct wireless_dev *wdev = wil_to_wdev(wil); - - return simple_read_from_buffer(user_buf, count, ppos, - wdev->ssid, wdev->ssid_len); -} - -static ssize_t wil_write_file_ssid(struct file *file, const char __user *buf, - size_t count, loff_t *ppos) -{ - struct wil6210_priv *wil = file->private_data; - struct wireless_dev *wdev = wil_to_wdev(wil); - struct net_device *ndev = wil_to_ndev(wil); - - if (*ppos != 0) { - wil_err(wil, "Unable to set SSID substring from [%d]\n", - (int)*ppos); - return -EINVAL; - } - - if (count > sizeof(wdev->ssid)) { - wil_err(wil, "SSID too long, len = %d\n", (int)count); - return -EINVAL; - } - if (netif_running(ndev)) { - wil_err(wil, "Unable to change SSID on running interface\n"); - return -EINVAL; - } - - wdev->ssid_len = count; - return simple_write_to_buffer(wdev->ssid, wdev->ssid_len, ppos, - buf, count); -} - -static const struct file_operations fops_ssid = { - .read = wil_read_file_ssid, - .write = wil_write_file_ssid, - .open = simple_open, -}; - /*---------temp------------*/ static void print_temp(struct seq_file *s, const char *prefix, u32 t) { @@ -1695,7 +1651,6 @@ static const struct { {"stations", 0444, &fops_sta}, {"desc", 0444, &fops_txdesc}, {"bf", 0444, &fops_bf}, - {"ssid", 0644, &fops_ssid}, {"mem_val", 0644, &fops_memread}, {"reset", 0244, &fops_reset}, {"rxon", 0244, &fops_rxon}, diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index bac829aa950d..885924abf61c 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -336,9 +336,9 @@ static void wil_disconnect_worker(struct work_struct *work) clear_bit(wil_status_fwconnecting, wil->status); } -static void wil_connect_timer_fn(ulong x) +static void wil_connect_timer_fn(struct timer_list *t) { - struct wil6210_priv *wil = (void *)x; + struct wil6210_priv *wil = from_timer(wil, t, connect_timer); bool q; wil_err(wil, "Connect timeout detected, disconnect station\n"); @@ -351,9 +351,9 @@ static void wil_connect_timer_fn(ulong x) wil_dbg_wmi(wil, "queue_work of disconnect_worker -> %d\n", q); } -static void wil_scan_timer_fn(ulong x) +static void wil_scan_timer_fn(struct timer_list *t) { - struct wil6210_priv *wil = (void *)x; + struct wil6210_priv *wil = from_timer(wil, t, scan_timer); clear_bit(wil_status_fwready, wil->status); wil_err(wil, "Scan timeout detected, start fw error recovery\n"); @@ -540,10 +540,9 @@ int wil_priv_init(struct wil6210_priv *wil) init_completion(&wil->halp.comp); wil->bcast_vring = -1; - setup_timer(&wil->connect_timer, wil_connect_timer_fn, (ulong)wil); - setup_timer(&wil->scan_timer, wil_scan_timer_fn, (ulong)wil); - setup_timer(&wil->p2p.discovery_timer, wil_p2p_discovery_timer_fn, - (ulong)wil); + timer_setup(&wil->connect_timer, wil_connect_timer_fn, 0); + timer_setup(&wil->scan_timer, wil_scan_timer_fn, 0); + timer_setup(&wil->p2p.discovery_timer, wil_p2p_discovery_timer_fn, 0); INIT_WORK(&wil->disconnect_worker, wil_disconnect_worker); INIT_WORK(&wil->wmi_event_worker, wmi_event_worker); diff --git a/drivers/net/wireless/ath/wil6210/p2p.c b/drivers/net/wireless/ath/wil6210/p2p.c index 792484756654..7dbee2c3e482 100644 --- a/drivers/net/wireless/ath/wil6210/p2p.c +++ b/drivers/net/wireless/ath/wil6210/p2p.c @@ -65,9 +65,9 @@ bool wil_p2p_is_social_scan(struct cfg80211_scan_request *request) (request->channels[0]->hw_value == P2P_DMG_SOCIAL_CHANNEL); } -void wil_p2p_discovery_timer_fn(ulong x) +void wil_p2p_discovery_timer_fn(struct timer_list *t) { - struct wil6210_priv *wil = (void *)x; + struct wil6210_priv *wil = from_timer(wil, t, p2p.discovery_timer); wil_dbg_misc(wil, "p2p_discovery_timer_fn\n"); diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index 315ec8b59662..1e340d04bd70 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -918,7 +918,7 @@ void wil6210_mask_halp(struct wil6210_priv *wil); /* P2P */ bool wil_p2p_is_social_scan(struct cfg80211_scan_request *request); -void wil_p2p_discovery_timer_fn(ulong x); +void wil_p2p_discovery_timer_fn(struct timer_list *t); int wil_p2p_search(struct wil6210_priv *wil, struct cfg80211_scan_request *request); int wil_p2p_listen(struct wil6210_priv *wil, struct wireless_dev *wdev, |