| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> |
|---|
| 3 | 4 | * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 7 | | - * published by the Free Software Foundation. |
|---|
| 5 | + * Copyright (C) 2020 Intel Corporation |
|---|
| 8 | 6 | */ |
|---|
| 9 | 7 | |
|---|
| 10 | 8 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 238 | 236 | |
|---|
| 239 | 237 | /* STA attributes */ |
|---|
| 240 | 238 | IEEE80211_IF_FILE(bssid, u.mgd.bssid, MAC); |
|---|
| 241 | | -IEEE80211_IF_FILE(aid, u.mgd.aid, DEC); |
|---|
| 239 | +IEEE80211_IF_FILE(aid, vif.bss_conf.aid, DEC); |
|---|
| 242 | 240 | IEEE80211_IF_FILE(beacon_timeout, u.mgd.beacon_timeout, JIFFIES_TO_MS); |
|---|
| 243 | 241 | |
|---|
| 244 | 242 | static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata, |
|---|
| .. | .. |
|---|
| 257 | 255 | smps_mode == IEEE80211_SMPS_AUTOMATIC)) |
|---|
| 258 | 256 | return -EINVAL; |
|---|
| 259 | 257 | |
|---|
| 260 | | - if (sdata->vif.type != NL80211_IFTYPE_STATION && |
|---|
| 261 | | - sdata->vif.type != NL80211_IFTYPE_AP) |
|---|
| 258 | + if (sdata->vif.type != NL80211_IFTYPE_STATION) |
|---|
| 262 | 259 | return -EOPNOTSUPP; |
|---|
| 263 | 260 | |
|---|
| 264 | 261 | sdata_lock(sdata); |
|---|
| 265 | | - if (sdata->vif.type == NL80211_IFTYPE_STATION) |
|---|
| 266 | | - err = __ieee80211_request_smps_mgd(sdata, smps_mode); |
|---|
| 267 | | - else |
|---|
| 268 | | - err = __ieee80211_request_smps_ap(sdata, smps_mode); |
|---|
| 262 | + err = __ieee80211_request_smps_mgd(sdata, smps_mode); |
|---|
| 269 | 263 | sdata_unlock(sdata); |
|---|
| 270 | 264 | |
|---|
| 271 | 265 | return err; |
|---|
| .. | .. |
|---|
| 284 | 278 | if (sdata->vif.type == NL80211_IFTYPE_STATION) |
|---|
| 285 | 279 | return snprintf(buf, buflen, "request: %s\nused: %s\n", |
|---|
| 286 | 280 | smps_modes[sdata->u.mgd.req_smps], |
|---|
| 287 | | - smps_modes[sdata->smps_mode]); |
|---|
| 288 | | - if (sdata->vif.type == NL80211_IFTYPE_AP) |
|---|
| 289 | | - return snprintf(buf, buflen, "request: %s\nused: %s\n", |
|---|
| 290 | | - smps_modes[sdata->u.ap.req_smps], |
|---|
| 291 | 281 | smps_modes[sdata->smps_mode]); |
|---|
| 292 | 282 | return -EINVAL; |
|---|
| 293 | 283 | } |
|---|
| .. | .. |
|---|
| 646 | 636 | IEEE80211_IF_FILE(power_mode, u.mesh.mshcfg.power_mode, DEC); |
|---|
| 647 | 637 | IEEE80211_IF_FILE(dot11MeshAwakeWindowDuration, |
|---|
| 648 | 638 | u.mesh.mshcfg.dot11MeshAwakeWindowDuration, DEC); |
|---|
| 639 | +IEEE80211_IF_FILE(dot11MeshConnectedToMeshGate, |
|---|
| 640 | + u.mesh.mshcfg.dot11MeshConnectedToMeshGate, DEC); |
|---|
| 641 | +IEEE80211_IF_FILE(dot11MeshNolearn, u.mesh.mshcfg.dot11MeshNolearn, DEC); |
|---|
| 642 | +IEEE80211_IF_FILE(dot11MeshConnectedToAuthServer, |
|---|
| 643 | + u.mesh.mshcfg.dot11MeshConnectedToAuthServer, DEC); |
|---|
| 649 | 644 | #endif |
|---|
| 650 | 645 | |
|---|
| 651 | 646 | #define DEBUGFS_ADD_MODE(name, mode) \ |
|---|
| .. | .. |
|---|
| 769 | 764 | MESHPARAMS_ADD(dot11MeshHWMPconfirmationInterval); |
|---|
| 770 | 765 | MESHPARAMS_ADD(power_mode); |
|---|
| 771 | 766 | MESHPARAMS_ADD(dot11MeshAwakeWindowDuration); |
|---|
| 767 | + MESHPARAMS_ADD(dot11MeshConnectedToMeshGate); |
|---|
| 768 | + MESHPARAMS_ADD(dot11MeshNolearn); |
|---|
| 769 | + MESHPARAMS_ADD(dot11MeshConnectedToAuthServer); |
|---|
| 772 | 770 | #undef MESHPARAMS_ADD |
|---|
| 773 | 771 | } |
|---|
| 774 | 772 | #endif |
|---|
| .. | .. |
|---|
| 822 | 820 | sprintf(buf, "netdev:%s", sdata->name); |
|---|
| 823 | 821 | sdata->vif.debugfs_dir = debugfs_create_dir(buf, |
|---|
| 824 | 822 | sdata->local->hw.wiphy->debugfsdir); |
|---|
| 825 | | - if (sdata->vif.debugfs_dir) |
|---|
| 826 | | - sdata->debugfs.subdir_stations = debugfs_create_dir("stations", |
|---|
| 827 | | - sdata->vif.debugfs_dir); |
|---|
| 823 | + sdata->debugfs.subdir_stations = debugfs_create_dir("stations", |
|---|
| 824 | + sdata->vif.debugfs_dir); |
|---|
| 828 | 825 | add_files(sdata); |
|---|
| 829 | 826 | } |
|---|
| 830 | 827 | |
|---|
| .. | .. |
|---|
| 849 | 846 | return; |
|---|
| 850 | 847 | |
|---|
| 851 | 848 | sprintf(buf, "netdev:%s", sdata->name); |
|---|
| 852 | | - if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf)) |
|---|
| 853 | | - sdata_err(sdata, |
|---|
| 854 | | - "debugfs: failed to rename debugfs dir to %s\n", |
|---|
| 855 | | - buf); |
|---|
| 849 | + debugfs_rename(dir->d_parent, dir, dir->d_parent, buf); |
|---|
| 856 | 850 | } |
|---|