Lines Matching +full:mode +full:- +full:capable

1 // SPDX-License-Identifier: GPL-2.0-or-later
26 int ret = -EINVAL; in get_integer()
44 if (!capable(CAP_NET_ADMIN)) in b43_attr_interfmode_show()
45 return -EPERM; in b43_attr_interfmode_show()
47 mutex_lock(&wldev->wl->mutex); in b43_attr_interfmode_show()
49 if (wldev->phy.type != B43_PHYTYPE_G) { in b43_attr_interfmode_show()
50 mutex_unlock(&wldev->wl->mutex); in b43_attr_interfmode_show()
51 return -ENOSYS; in b43_attr_interfmode_show()
54 switch (wldev->phy.g->interfmode) { in b43_attr_interfmode_show()
60 "1 (Non-WLAN Interference Mitigation)\n"); in b43_attr_interfmode_show()
69 mutex_unlock(&wldev->wl->mutex); in b43_attr_interfmode_show()
80 int mode; in b43_attr_interfmode_store() local
82 if (!capable(CAP_NET_ADMIN)) in b43_attr_interfmode_store()
83 return -EPERM; in b43_attr_interfmode_store()
85 mode = get_integer(buf, count); in b43_attr_interfmode_store()
86 switch (mode) { in b43_attr_interfmode_store()
88 mode = B43_INTERFMODE_NONE; in b43_attr_interfmode_store()
91 mode = B43_INTERFMODE_NONWLAN; in b43_attr_interfmode_store()
94 mode = B43_INTERFMODE_MANUALWLAN; in b43_attr_interfmode_store()
97 mode = B43_INTERFMODE_AUTOWLAN; in b43_attr_interfmode_store()
100 return -EINVAL; in b43_attr_interfmode_store()
103 mutex_lock(&wldev->wl->mutex); in b43_attr_interfmode_store()
105 if (wldev->phy.ops->interf_mitigation) { in b43_attr_interfmode_store()
106 err = wldev->phy.ops->interf_mitigation(wldev, mode); in b43_attr_interfmode_store()
108 b43err(wldev->wl, "Interference Mitigation not " in b43_attr_interfmode_store()
112 err = -ENOSYS; in b43_attr_interfmode_store()
114 mutex_unlock(&wldev->wl->mutex); in b43_attr_interfmode_store()
124 struct device *dev = wldev->dev->dev; in b43_sysfs_register()
133 struct device *dev = wldev->dev->dev; in b43_sysfs_unregister()