mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-14 19:53:03 +00:00
{nl,cfg,mac}80211: fix the coding style related to mesh parameters
fix the coding style related to mesh parameters, especially the indentation, as pointed out by Johannes Berg. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
3ddd53f392
commit
a4f606ea73
6 changed files with 130 additions and 120 deletions
|
@ -2122,15 +2122,16 @@ enum nl80211_mntr_flags {
|
||||||
* until giving up on a path discovery (in milliseconds)
|
* until giving up on a path discovery (in milliseconds)
|
||||||
*
|
*
|
||||||
* @NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT: The time (in TUs) for which mesh
|
* @NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT: The time (in TUs) for which mesh
|
||||||
* points receiving a PREQ shall consider the forwarding information from the
|
* points receiving a PREQ shall consider the forwarding information from
|
||||||
* root to be valid. (TU = time unit)
|
* the root to be valid. (TU = time unit)
|
||||||
*
|
*
|
||||||
* @NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL: The minimum interval of time (in
|
* @NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL: The minimum interval of time (in
|
||||||
* TUs) during which an MP can send only one action frame containing a PREQ
|
* TUs) during which an MP can send only one action frame containing a PREQ
|
||||||
* reference element
|
* reference element
|
||||||
*
|
*
|
||||||
* @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs)
|
* @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs)
|
||||||
* that it takes for an HWMP information element to propagate across the mesh
|
* that it takes for an HWMP information element to propagate across the
|
||||||
|
* mesh
|
||||||
*
|
*
|
||||||
* @NL80211_MESHCONF_HWMP_ROOTMODE: whether root mode is enabled or not
|
* @NL80211_MESHCONF_HWMP_ROOTMODE: whether root mode is enabled or not
|
||||||
*
|
*
|
||||||
|
@ -2155,13 +2156,14 @@ enum nl80211_mntr_flags {
|
||||||
* threshold for average signal strength of candidate station to establish
|
* threshold for average signal strength of candidate station to establish
|
||||||
* a peer link.
|
* a peer link.
|
||||||
*
|
*
|
||||||
* @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
|
|
||||||
*
|
|
||||||
* @NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR: maximum number of neighbors
|
* @NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR: maximum number of neighbors
|
||||||
* to synchronize to for 11s default synchronization method (see 11C.12.2.2)
|
* to synchronize to for 11s default synchronization method
|
||||||
|
* (see 11C.12.2.2)
|
||||||
*
|
*
|
||||||
* @NL80211_MESHCONF_HT_OPMODE: set mesh HT protection mode.
|
* @NL80211_MESHCONF_HT_OPMODE: set mesh HT protection mode.
|
||||||
*
|
*
|
||||||
|
* @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
|
||||||
|
*
|
||||||
* @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
|
* @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
|
||||||
*/
|
*/
|
||||||
enum nl80211_meshconf_params {
|
enum nl80211_meshconf_params {
|
||||||
|
@ -2203,35 +2205,37 @@ enum nl80211_meshconf_params {
|
||||||
* @__NL80211_MESH_SETUP_INVALID: Internal use
|
* @__NL80211_MESH_SETUP_INVALID: Internal use
|
||||||
*
|
*
|
||||||
* @NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL: Enable this option to use a
|
* @NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL: Enable this option to use a
|
||||||
* vendor specific path selection algorithm or disable it to use the default
|
* vendor specific path selection algorithm or disable it to use the
|
||||||
* HWMP.
|
* default HWMP.
|
||||||
*
|
*
|
||||||
* @NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC: Enable this option to use a
|
* @NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC: Enable this option to use a
|
||||||
* vendor specific path metric or disable it to use the default Airtime
|
* vendor specific path metric or disable it to use the default Airtime
|
||||||
* metric.
|
* metric.
|
||||||
*
|
*
|
||||||
* @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a
|
* @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a
|
||||||
* robust security network ie, or a vendor specific information element that
|
* robust security network ie, or a vendor specific information element
|
||||||
* vendors will use to identify the path selection methods and metrics in use.
|
* that vendors will use to identify the path selection methods and
|
||||||
|
* metrics in use.
|
||||||
*
|
*
|
||||||
* @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication
|
* @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication
|
||||||
* daemon will be authenticating mesh candidates.
|
* daemon will be authenticating mesh candidates.
|
||||||
*
|
*
|
||||||
* @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication
|
* @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication
|
||||||
* daemon will be securing peer link frames. AMPE is a secured version of Mesh
|
* daemon will be securing peer link frames. AMPE is a secured version of
|
||||||
* Peering Management (MPM) and is implemented with the assistance of a
|
* Mesh Peering Management (MPM) and is implemented with the assistance of
|
||||||
* userspace daemon. When this flag is set, the kernel will send peer
|
* a userspace daemon. When this flag is set, the kernel will send peer
|
||||||
* management frames to a userspace daemon that will implement AMPE
|
* management frames to a userspace daemon that will implement AMPE
|
||||||
* functionality (security capabilities selection, key confirmation, and key
|
* functionality (security capabilities selection, key confirmation, and
|
||||||
* management). When the flag is unset (default), the kernel can autonomously
|
* key management). When the flag is unset (default), the kernel can
|
||||||
* complete (unsecured) mesh peering without the need of a userspace daemon.
|
* autonomously complete (unsecured) mesh peering without the need of a
|
||||||
*
|
* userspace daemon.
|
||||||
* @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
|
|
||||||
*
|
*
|
||||||
* @NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC: Enable this option to use a
|
* @NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC: Enable this option to use a
|
||||||
* vendor specific synchronization method or disable it to use the default
|
* vendor specific synchronization method or disable it to use the default
|
||||||
* neighbor offset synchronization
|
* neighbor offset synchronization
|
||||||
*
|
*
|
||||||
|
* @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
|
||||||
|
*
|
||||||
* @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
|
* @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
|
||||||
*/
|
*/
|
||||||
enum nl80211_mesh_setup_params {
|
enum nl80211_mesh_setup_params {
|
||||||
|
|
|
@ -1571,10 +1571,9 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
|
||||||
conf->dot11MeshGateAnnouncementProtocol =
|
conf->dot11MeshGateAnnouncementProtocol =
|
||||||
nconf->dot11MeshGateAnnouncementProtocol;
|
nconf->dot11MeshGateAnnouncementProtocol;
|
||||||
}
|
}
|
||||||
if (_chg_mesh_attr(NL80211_MESHCONF_HWMP_RANN_INTERVAL, mask)) {
|
if (_chg_mesh_attr(NL80211_MESHCONF_HWMP_RANN_INTERVAL, mask))
|
||||||
conf->dot11MeshHWMPRannInterval =
|
conf->dot11MeshHWMPRannInterval =
|
||||||
nconf->dot11MeshHWMPRannInterval;
|
nconf->dot11MeshHWMPRannInterval;
|
||||||
}
|
|
||||||
if (_chg_mesh_attr(NL80211_MESHCONF_FORWARDING, mask))
|
if (_chg_mesh_attr(NL80211_MESHCONF_FORWARDING, mask))
|
||||||
conf->dot11MeshForwarding = nconf->dot11MeshForwarding;
|
conf->dot11MeshForwarding = nconf->dot11MeshForwarding;
|
||||||
if (_chg_mesh_attr(NL80211_MESHCONF_RSSI_THRESHOLD, mask)) {
|
if (_chg_mesh_attr(NL80211_MESHCONF_RSSI_THRESHOLD, mask)) {
|
||||||
|
|
|
@ -3492,7 +3492,6 @@ static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_A
|
||||||
[NL80211_MESHCONF_ELEMENT_TTL] = { .type = NLA_U8 },
|
[NL80211_MESHCONF_ELEMENT_TTL] = { .type = NLA_U8 },
|
||||||
[NL80211_MESHCONF_AUTO_OPEN_PLINKS] = { .type = NLA_U8 },
|
[NL80211_MESHCONF_AUTO_OPEN_PLINKS] = { .type = NLA_U8 },
|
||||||
[NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR] = { .type = NLA_U32 },
|
[NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR] = { .type = NLA_U32 },
|
||||||
|
|
||||||
[NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES] = { .type = NLA_U8 },
|
[NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES] = { .type = NLA_U8 },
|
||||||
[NL80211_MESHCONF_PATH_REFRESH_TIME] = { .type = NLA_U32 },
|
[NL80211_MESHCONF_PATH_REFRESH_TIME] = { .type = NLA_U32 },
|
||||||
[NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT] = { .type = NLA_U16 },
|
[NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT] = { .type = NLA_U16 },
|
||||||
|
@ -3548,34 +3547,42 @@ do {\
|
||||||
|
|
||||||
/* Fill in the params struct */
|
/* Fill in the params struct */
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshRetryTimeout,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshRetryTimeout,
|
||||||
mask, NL80211_MESHCONF_RETRY_TIMEOUT, nla_get_u16);
|
mask, NL80211_MESHCONF_RETRY_TIMEOUT,
|
||||||
|
nla_get_u16);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshConfirmTimeout,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshConfirmTimeout,
|
||||||
mask, NL80211_MESHCONF_CONFIRM_TIMEOUT, nla_get_u16);
|
mask, NL80211_MESHCONF_CONFIRM_TIMEOUT,
|
||||||
|
nla_get_u16);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHoldingTimeout,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHoldingTimeout,
|
||||||
mask, NL80211_MESHCONF_HOLDING_TIMEOUT, nla_get_u16);
|
mask, NL80211_MESHCONF_HOLDING_TIMEOUT,
|
||||||
|
nla_get_u16);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshMaxPeerLinks,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshMaxPeerLinks,
|
||||||
mask, NL80211_MESHCONF_MAX_PEER_LINKS, nla_get_u16);
|
mask, NL80211_MESHCONF_MAX_PEER_LINKS,
|
||||||
|
nla_get_u16);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshMaxRetries,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshMaxRetries,
|
||||||
mask, NL80211_MESHCONF_MAX_RETRIES, nla_get_u8);
|
mask, NL80211_MESHCONF_MAX_RETRIES,
|
||||||
|
nla_get_u8);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshTTL,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshTTL,
|
||||||
mask, NL80211_MESHCONF_TTL, nla_get_u8);
|
mask, NL80211_MESHCONF_TTL, nla_get_u8);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, element_ttl,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, element_ttl,
|
||||||
mask, NL80211_MESHCONF_ELEMENT_TTL, nla_get_u8);
|
mask, NL80211_MESHCONF_ELEMENT_TTL,
|
||||||
|
nla_get_u8);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, auto_open_plinks,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, auto_open_plinks,
|
||||||
mask, NL80211_MESHCONF_AUTO_OPEN_PLINKS, nla_get_u8);
|
mask, NL80211_MESHCONF_AUTO_OPEN_PLINKS,
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshNbrOffsetMaxNeighbor,
|
nla_get_u8);
|
||||||
mask, NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshNbrOffsetMaxNeighbor, mask,
|
||||||
|
NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR,
|
||||||
nla_get_u32);
|
nla_get_u32);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPmaxPREQretries,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPmaxPREQretries,
|
||||||
mask, NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES,
|
mask, NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES,
|
||||||
nla_get_u8);
|
nla_get_u8);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, path_refresh_time,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, path_refresh_time,
|
||||||
mask, NL80211_MESHCONF_PATH_REFRESH_TIME, nla_get_u32);
|
mask, NL80211_MESHCONF_PATH_REFRESH_TIME,
|
||||||
|
nla_get_u32);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, min_discovery_timeout,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, min_discovery_timeout,
|
||||||
mask, NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT,
|
mask, NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT,
|
||||||
nla_get_u16);
|
nla_get_u16);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPactivePathTimeout,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPactivePathTimeout, mask,
|
||||||
mask, NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
|
NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
|
||||||
nla_get_u32);
|
nla_get_u32);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPpreqMinInterval,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPpreqMinInterval,
|
||||||
mask, NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
|
mask, NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
|
||||||
|
@ -3584,15 +3591,12 @@ do {\
|
||||||
mask, NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL,
|
mask, NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL,
|
||||||
nla_get_u16);
|
nla_get_u16);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg,
|
||||||
dot11MeshHWMPnetDiameterTraversalTime,
|
dot11MeshHWMPnetDiameterTraversalTime, mask,
|
||||||
mask, NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
|
NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
|
||||||
nla_get_u16);
|
nla_get_u16);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPRootMode, mask,
|
||||||
dot11MeshHWMPRootMode, mask,
|
NL80211_MESHCONF_HWMP_ROOTMODE, nla_get_u8);
|
||||||
NL80211_MESHCONF_HWMP_ROOTMODE,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPRannInterval, mask,
|
||||||
nla_get_u8);
|
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg,
|
|
||||||
dot11MeshHWMPRannInterval, mask,
|
|
||||||
NL80211_MESHCONF_HWMP_RANN_INTERVAL,
|
NL80211_MESHCONF_HWMP_RANN_INTERVAL,
|
||||||
nla_get_u16);
|
nla_get_u16);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg,
|
||||||
|
@ -3600,11 +3604,14 @@ do {\
|
||||||
NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
|
NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
|
||||||
nla_get_u8);
|
nla_get_u8);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshForwarding,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshForwarding,
|
||||||
mask, NL80211_MESHCONF_FORWARDING, nla_get_u8);
|
mask, NL80211_MESHCONF_FORWARDING,
|
||||||
|
nla_get_u8);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold,
|
||||||
mask, NL80211_MESHCONF_RSSI_THRESHOLD, nla_get_u32);
|
mask, NL80211_MESHCONF_RSSI_THRESHOLD,
|
||||||
|
nla_get_u32);
|
||||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode,
|
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode,
|
||||||
mask, NL80211_MESHCONF_HT_OPMODE, nla_get_u16);
|
mask, NL80211_MESHCONF_HT_OPMODE,
|
||||||
|
nla_get_u16);
|
||||||
if (mask_out)
|
if (mask_out)
|
||||||
*mask_out = mask;
|
*mask_out = mask;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue