mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-11 16:24:26 +08:00
ath6kl: Implement remain_on_channel and cancel_remain_on_channel
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
6465ddcf6c
commit
63fa1e0ca7
@ -1658,6 +1658,35 @@ static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
|
|||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int ath6kl_remain_on_channel(struct wiphy *wiphy,
|
||||||
|
struct net_device *dev,
|
||||||
|
struct ieee80211_channel *chan,
|
||||||
|
enum nl80211_channel_type channel_type,
|
||||||
|
unsigned int duration,
|
||||||
|
u64 *cookie)
|
||||||
|
{
|
||||||
|
struct ath6kl *ar = ath6kl_priv(dev);
|
||||||
|
|
||||||
|
/* TODO: if already pending or ongoing remain-on-channel,
|
||||||
|
* return -EBUSY */
|
||||||
|
*cookie = 1; /* only a single pending request is supported */
|
||||||
|
|
||||||
|
return ath6kl_wmi_remain_on_chnl_cmd(ar->wmi, chan->center_freq,
|
||||||
|
duration);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ath6kl_cancel_remain_on_channel(struct wiphy *wiphy,
|
||||||
|
struct net_device *dev,
|
||||||
|
u64 cookie)
|
||||||
|
{
|
||||||
|
struct ath6kl *ar = ath6kl_priv(dev);
|
||||||
|
|
||||||
|
if (cookie != 1)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
return ath6kl_wmi_cancel_remain_on_chnl_cmd(ar->wmi);
|
||||||
|
}
|
||||||
|
|
||||||
static struct cfg80211_ops ath6kl_cfg80211_ops = {
|
static struct cfg80211_ops ath6kl_cfg80211_ops = {
|
||||||
.change_virtual_intf = ath6kl_cfg80211_change_iface,
|
.change_virtual_intf = ath6kl_cfg80211_change_iface,
|
||||||
.scan = ath6kl_cfg80211_scan,
|
.scan = ath6kl_cfg80211_scan,
|
||||||
@ -1685,6 +1714,8 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
|
|||||||
.set_beacon = ath6kl_set_beacon,
|
.set_beacon = ath6kl_set_beacon,
|
||||||
.del_beacon = ath6kl_del_beacon,
|
.del_beacon = ath6kl_del_beacon,
|
||||||
.change_station = ath6kl_change_station,
|
.change_station = ath6kl_change_station,
|
||||||
|
.remain_on_channel = ath6kl_remain_on_channel,
|
||||||
|
.cancel_remain_on_channel = ath6kl_cancel_remain_on_channel,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wireless_dev *ath6kl_cfg80211_init(struct device *dev)
|
struct wireless_dev *ath6kl_cfg80211_init(struct device *dev)
|
||||||
@ -1706,6 +1737,8 @@ struct wireless_dev *ath6kl_cfg80211_init(struct device *dev)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wdev->wiphy->max_remain_on_channel_duration = 5000;
|
||||||
|
|
||||||
/* set device pointer for wiphy */
|
/* set device pointer for wiphy */
|
||||||
set_wiphy_dev(wdev->wiphy, dev);
|
set_wiphy_dev(wdev->wiphy, dev);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user