diff options
author | Chun-Yeow Yeoh <yeohchunyeow@gmail.com> | 2012-06-10 23:59:36 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-11 03:23:45 -0400 |
commit | a4f606ea73d56d15f28653d2242e54d58bb612e5 (patch) | |
tree | f885d00931cb33a5da5f4ac391bc6d8e521e456f | |
parent | 3ddd53f392c4f8e19e1110d1bdef770008b128b8 (diff) |
{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>
-rw-r--r-- | include/linux/ieee80211.h | 6 | ||||
-rw-r--r-- | include/linux/nl80211.h | 98 | ||||
-rw-r--r-- | include/net/cfg80211.h | 12 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 3 | ||||
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 34 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 97 |
6 files changed, 130 insertions, 120 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index ce9af8918514..f831078182de 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -1443,7 +1443,7 @@ enum ieee80211_tdls_actioncode { | |||
1443 | * | 1443 | * |
1444 | * @IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET: the default synchronization method | 1444 | * @IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET: the default synchronization method |
1445 | * @IEEE80211_SYNC_METHOD_VENDOR: a vendor specific synchronization method | 1445 | * @IEEE80211_SYNC_METHOD_VENDOR: a vendor specific synchronization method |
1446 | * that will be specified in a vendor specific information element | 1446 | * that will be specified in a vendor specific information element |
1447 | */ | 1447 | */ |
1448 | enum { | 1448 | enum { |
1449 | IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET = 1, | 1449 | IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET = 1, |
@@ -1455,7 +1455,7 @@ enum { | |||
1455 | * | 1455 | * |
1456 | * @IEEE80211_PATH_PROTOCOL_HWMP: the default path selection protocol | 1456 | * @IEEE80211_PATH_PROTOCOL_HWMP: the default path selection protocol |
1457 | * @IEEE80211_PATH_PROTOCOL_VENDOR: a vendor specific protocol that will | 1457 | * @IEEE80211_PATH_PROTOCOL_VENDOR: a vendor specific protocol that will |
1458 | * be specified in a vendor specific information element | 1458 | * be specified in a vendor specific information element |
1459 | */ | 1459 | */ |
1460 | enum { | 1460 | enum { |
1461 | IEEE80211_PATH_PROTOCOL_HWMP = 1, | 1461 | IEEE80211_PATH_PROTOCOL_HWMP = 1, |
@@ -1467,7 +1467,7 @@ enum { | |||
1467 | * | 1467 | * |
1468 | * @IEEE80211_PATH_METRIC_AIRTIME: the default path selection metric | 1468 | * @IEEE80211_PATH_METRIC_AIRTIME: the default path selection metric |
1469 | * @IEEE80211_PATH_METRIC_VENDOR: a vendor specific metric that will be | 1469 | * @IEEE80211_PATH_METRIC_VENDOR: a vendor specific metric that will be |
1470 | * specified in a vendor specific information element | 1470 | * specified in a vendor specific information element |
1471 | */ | 1471 | */ |
1472 | enum { | 1472 | enum { |
1473 | IEEE80211_PATH_METRIC_AIRTIME = 1, | 1473 | IEEE80211_PATH_METRIC_AIRTIME = 1, |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 970afdf5a605..c61e1621822c 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -2090,78 +2090,80 @@ enum nl80211_mntr_flags { | |||
2090 | * @__NL80211_MESHCONF_INVALID: internal use | 2090 | * @__NL80211_MESHCONF_INVALID: internal use |
2091 | * | 2091 | * |
2092 | * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in | 2092 | * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in |
2093 | * millisecond units, used by the Peer Link Open message | 2093 | * millisecond units, used by the Peer Link Open message |
2094 | * | 2094 | * |
2095 | * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the initial confirm timeout, in | 2095 | * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the initial confirm timeout, in |
2096 | * millisecond units, used by the peer link management to close a peer link | 2096 | * millisecond units, used by the peer link management to close a peer link |
2097 | * | 2097 | * |
2098 | * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in | 2098 | * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in |
2099 | * millisecond units | 2099 | * millisecond units |
2100 | * | 2100 | * |
2101 | * @NL80211_MESHCONF_MAX_PEER_LINKS: maximum number of peer links allowed | 2101 | * @NL80211_MESHCONF_MAX_PEER_LINKS: maximum number of peer links allowed |
2102 | * on this mesh interface | 2102 | * on this mesh interface |
2103 | * | 2103 | * |
2104 | * @NL80211_MESHCONF_MAX_RETRIES: specifies the maximum number of peer link | 2104 | * @NL80211_MESHCONF_MAX_RETRIES: specifies the maximum number of peer link |
2105 | * open retries that can be sent to establish a new peer link instance in a | 2105 | * open retries that can be sent to establish a new peer link instance in a |
2106 | * mesh | 2106 | * mesh |
2107 | * | 2107 | * |
2108 | * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh | 2108 | * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh |
2109 | * point. | 2109 | * point. |
2110 | * | 2110 | * |
2111 | * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically | 2111 | * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically |
2112 | * open peer links when we detect compatible mesh peers. | 2112 | * open peer links when we detect compatible mesh peers. |
2113 | * | 2113 | * |
2114 | * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames | 2114 | * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames |
2115 | * containing a PREQ that an MP can send to a particular destination (path | 2115 | * containing a PREQ that an MP can send to a particular destination (path |
2116 | * target) | 2116 | * target) |
2117 | * | 2117 | * |
2118 | * @NL80211_MESHCONF_PATH_REFRESH_TIME: how frequently to refresh mesh paths | 2118 | * @NL80211_MESHCONF_PATH_REFRESH_TIME: how frequently to refresh mesh paths |
2119 | * (in milliseconds) | 2119 | * (in milliseconds) |
2120 | * | 2120 | * |
2121 | * @NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT: minimum length of time to wait | 2121 | * @NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT: minimum length of time to wait |
2122 | * until giving up on a path discovery (in milliseconds) | 2122 | * until giving up on a path discovery (in milliseconds) |
2123 | * | 2123 | * |
2124 | * @NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT: The time (in TUs) for which mesh | 2124 | * @NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT: The time (in TUs) for which mesh |
2125 | * points receiving a PREQ shall consider the forwarding information from the | 2125 | * points receiving a PREQ shall consider the forwarding information from |
2126 | * root to be valid. (TU = time unit) | 2126 | * the root to be valid. (TU = time unit) |
2127 | * | 2127 | * |
2128 | * @NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL: The minimum interval of time (in | 2128 | * @NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL: The minimum interval of time (in |
2129 | * TUs) during which an MP can send only one action frame containing a PREQ | 2129 | * TUs) during which an MP can send only one action frame containing a PREQ |
2130 | * reference element | 2130 | * reference element |
2131 | * | 2131 | * |
2132 | * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) | 2132 | * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) |
2133 | * that it takes for an HWMP information element to propagate across the mesh | 2133 | * that it takes for an HWMP information element to propagate across the |
2134 | * mesh | ||
2134 | * | 2135 | * |
2135 | * @NL80211_MESHCONF_HWMP_ROOTMODE: whether root mode is enabled or not | 2136 | * @NL80211_MESHCONF_HWMP_ROOTMODE: whether root mode is enabled or not |
2136 | * | 2137 | * |
2137 | * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a | 2138 | * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a |
2138 | * source mesh point for path selection elements. | 2139 | * source mesh point for path selection elements. |
2139 | * | 2140 | * |
2140 | * @NL80211_MESHCONF_HWMP_RANN_INTERVAL: The interval of time (in TUs) between | 2141 | * @NL80211_MESHCONF_HWMP_RANN_INTERVAL: The interval of time (in TUs) between |
2141 | * root announcements are transmitted. | 2142 | * root announcements are transmitted. |
2142 | * | 2143 | * |
2143 | * @NL80211_MESHCONF_GATE_ANNOUNCEMENTS: Advertise that this mesh station has | 2144 | * @NL80211_MESHCONF_GATE_ANNOUNCEMENTS: Advertise that this mesh station has |
2144 | * access to a broader network beyond the MBSS. This is done via Root | 2145 | * access to a broader network beyond the MBSS. This is done via Root |
2145 | * Announcement frames. | 2146 | * Announcement frames. |
2146 | * | 2147 | * |
2147 | * @NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL: The minimum interval of time (in | 2148 | * @NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL: The minimum interval of time (in |
2148 | * TUs) during which a mesh STA can send only one Action frame containing a | 2149 | * TUs) during which a mesh STA can send only one Action frame containing a |
2149 | * PERR element. | 2150 | * PERR element. |
2150 | * | 2151 | * |
2151 | * @NL80211_MESHCONF_FORWARDING: set Mesh STA as forwarding or non-forwarding | 2152 | * @NL80211_MESHCONF_FORWARDING: set Mesh STA as forwarding or non-forwarding |
2152 | * or forwarding entity (default is TRUE - forwarding entity) | 2153 | * or forwarding entity (default is TRUE - forwarding entity) |
2153 | * | 2154 | * |
2154 | * @NL80211_MESHCONF_RSSI_THRESHOLD: RSSI threshold in dBm. This specifies the | 2155 | * @NL80211_MESHCONF_RSSI_THRESHOLD: RSSI threshold in dBm. This specifies the |
2155 | * threshold for average signal strength of candidate station to establish | 2156 | * threshold for average signal strength of candidate station to establish |
2156 | * a peer link. | 2157 | * a peer link. |
2157 | * | ||
2158 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute | ||
2159 | * | 2158 | * |
2160 | * @NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR: maximum number of neighbors | 2159 | * @NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR: maximum number of neighbors |
2161 | * to synchronize to for 11s default synchronization method (see 11C.12.2.2) | 2160 | * to synchronize to for 11s default synchronization method |
2161 | * (see 11C.12.2.2) | ||
2162 | * | 2162 | * |
2163 | * @NL80211_MESHCONF_HT_OPMODE: set mesh HT protection mode. | 2163 | * @NL80211_MESHCONF_HT_OPMODE: set mesh HT protection mode. |
2164 | * | 2164 | * |
2165 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute | ||
2166 | * | ||
2165 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use | 2167 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use |
2166 | */ | 2168 | */ |
2167 | enum nl80211_meshconf_params { | 2169 | enum nl80211_meshconf_params { |
@@ -2203,34 +2205,36 @@ enum nl80211_meshconf_params { | |||
2203 | * @__NL80211_MESH_SETUP_INVALID: Internal use | 2205 | * @__NL80211_MESH_SETUP_INVALID: Internal use |
2204 | * | 2206 | * |
2205 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL: Enable this option to use a | 2207 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL: Enable this option to use a |
2206 | * vendor specific path selection algorithm or disable it to use the default | 2208 | * vendor specific path selection algorithm or disable it to use the |
2207 | * HWMP. | 2209 | * default HWMP. |
2208 | * | 2210 | * |
2209 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC: Enable this option to use a | 2211 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC: Enable this option to use a |
2210 | * vendor specific path metric or disable it to use the default Airtime | 2212 | * vendor specific path metric or disable it to use the default Airtime |
2211 | * metric. | 2213 | * metric. |
2212 | * | 2214 | * |
2213 | * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a | 2215 | * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a |
2214 | * robust security network ie, or a vendor specific information element that | 2216 | * robust security network ie, or a vendor specific information element |
2215 | * vendors will use to identify the path selection methods and metrics in use. | 2217 | * that vendors will use to identify the path selection methods and |
2218 | * metrics in use. | ||
2216 | * | 2219 | * |
2217 | * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication | 2220 | * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication |
2218 | * daemon will be authenticating mesh candidates. | 2221 | * daemon will be authenticating mesh candidates. |
2219 | * | 2222 | * |
2220 | * @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication | 2223 | * @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication |
2221 | * daemon will be securing peer link frames. AMPE is a secured version of Mesh | 2224 | * daemon will be securing peer link frames. AMPE is a secured version of |
2222 | * Peering Management (MPM) and is implemented with the assistance of a | 2225 | * Mesh Peering Management (MPM) and is implemented with the assistance of |
2223 | * userspace daemon. When this flag is set, the kernel will send peer | 2226 | * a userspace daemon. When this flag is set, the kernel will send peer |
2224 | * management frames to a userspace daemon that will implement AMPE | 2227 | * management frames to a userspace daemon that will implement AMPE |
2225 | * functionality (security capabilities selection, key confirmation, and key | 2228 | * functionality (security capabilities selection, key confirmation, and |
2226 | * management). When the flag is unset (default), the kernel can autonomously | 2229 | * key management). When the flag is unset (default), the kernel can |
2227 | * complete (unsecured) mesh peering without the need of a userspace daemon. | 2230 | * autonomously complete (unsecured) mesh peering without the need of a |
2228 | * | 2231 | * userspace daemon. |
2229 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number | ||
2230 | * | 2232 | * |
2231 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC: Enable this option to use a | 2233 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC: Enable this option to use a |
2232 | * vendor specific synchronization method or disable it to use the default | 2234 | * vendor specific synchronization method or disable it to use the default |
2233 | * neighbor offset synchronization | 2235 | * neighbor offset synchronization |
2236 | * | ||
2237 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number | ||
2234 | * | 2238 | * |
2235 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use | 2239 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use |
2236 | */ | 2240 | */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a129ee2f5483..778e533a9734 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -848,21 +848,21 @@ struct mesh_config { | |||
848 | u16 dot11MeshConfirmTimeout; | 848 | u16 dot11MeshConfirmTimeout; |
849 | u16 dot11MeshHoldingTimeout; | 849 | u16 dot11MeshHoldingTimeout; |
850 | u16 dot11MeshMaxPeerLinks; | 850 | u16 dot11MeshMaxPeerLinks; |
851 | u8 dot11MeshMaxRetries; | 851 | u8 dot11MeshMaxRetries; |
852 | u8 dot11MeshTTL; | 852 | u8 dot11MeshTTL; |
853 | u8 element_ttl; | 853 | u8 element_ttl; |
854 | bool auto_open_plinks; | 854 | bool auto_open_plinks; |
855 | u32 dot11MeshNbrOffsetMaxNeighbor; | 855 | u32 dot11MeshNbrOffsetMaxNeighbor; |
856 | u8 dot11MeshHWMPmaxPREQretries; | 856 | u8 dot11MeshHWMPmaxPREQretries; |
857 | u32 path_refresh_time; | 857 | u32 path_refresh_time; |
858 | u16 min_discovery_timeout; | 858 | u16 min_discovery_timeout; |
859 | u32 dot11MeshHWMPactivePathTimeout; | 859 | u32 dot11MeshHWMPactivePathTimeout; |
860 | u16 dot11MeshHWMPpreqMinInterval; | 860 | u16 dot11MeshHWMPpreqMinInterval; |
861 | u16 dot11MeshHWMPperrMinInterval; | 861 | u16 dot11MeshHWMPperrMinInterval; |
862 | u16 dot11MeshHWMPnetDiameterTraversalTime; | 862 | u16 dot11MeshHWMPnetDiameterTraversalTime; |
863 | u8 dot11MeshHWMPRootMode; | 863 | u8 dot11MeshHWMPRootMode; |
864 | u16 dot11MeshHWMPRannInterval; | 864 | u16 dot11MeshHWMPRannInterval; |
865 | bool dot11MeshGateAnnouncementProtocol; | 865 | bool dot11MeshGateAnnouncementProtocol; |
866 | bool dot11MeshForwarding; | 866 | bool dot11MeshForwarding; |
867 | s32 rssi_threshold; | 867 | s32 rssi_threshold; |
868 | u16 ht_opmode; | 868 | u16 ht_opmode; |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 498c94e34427..f41f9bea242a 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1571,10 +1571,9 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy, | |||
1571 | conf->dot11MeshGateAnnouncementProtocol = | 1571 | conf->dot11MeshGateAnnouncementProtocol = |
1572 | nconf->dot11MeshGateAnnouncementProtocol; | 1572 | nconf->dot11MeshGateAnnouncementProtocol; |
1573 | } | 1573 | } |
1574 | if (_chg_mesh_attr(NL80211_MESHCONF_HWMP_RANN_INTERVAL, mask)) { | 1574 | if (_chg_mesh_attr(NL80211_MESHCONF_HWMP_RANN_INTERVAL, mask)) |
1575 | conf->dot11MeshHWMPRannInterval = | 1575 | conf->dot11MeshHWMPRannInterval = |
1576 | nconf->dot11MeshHWMPRannInterval; | 1576 | nconf->dot11MeshHWMPRannInterval; |
1577 | } | ||
1578 | if (_chg_mesh_attr(NL80211_MESHCONF_FORWARDING, mask)) | 1577 | if (_chg_mesh_attr(NL80211_MESHCONF_FORWARDING, mask)) |
1579 | conf->dot11MeshForwarding = nconf->dot11MeshForwarding; | 1578 | conf->dot11MeshForwarding = nconf->dot11MeshForwarding; |
1580 | if (_chg_mesh_attr(NL80211_MESHCONF_RSSI_THRESHOLD, mask)) { | 1579 | if (_chg_mesh_attr(NL80211_MESHCONF_RSSI_THRESHOLD, mask)) { |
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index d4272ff43f71..c429417e1322 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -468,45 +468,45 @@ IEEE80211_IF_FILE(fwded_unicast, u.mesh.mshstats.fwded_unicast, DEC); | |||
468 | IEEE80211_IF_FILE(fwded_frames, u.mesh.mshstats.fwded_frames, DEC); | 468 | IEEE80211_IF_FILE(fwded_frames, u.mesh.mshstats.fwded_frames, DEC); |
469 | IEEE80211_IF_FILE(dropped_frames_ttl, u.mesh.mshstats.dropped_frames_ttl, DEC); | 469 | IEEE80211_IF_FILE(dropped_frames_ttl, u.mesh.mshstats.dropped_frames_ttl, DEC); |
470 | IEEE80211_IF_FILE(dropped_frames_congestion, | 470 | IEEE80211_IF_FILE(dropped_frames_congestion, |
471 | u.mesh.mshstats.dropped_frames_congestion, DEC); | 471 | u.mesh.mshstats.dropped_frames_congestion, DEC); |
472 | IEEE80211_IF_FILE(dropped_frames_no_route, | 472 | IEEE80211_IF_FILE(dropped_frames_no_route, |
473 | u.mesh.mshstats.dropped_frames_no_route, DEC); | 473 | u.mesh.mshstats.dropped_frames_no_route, DEC); |
474 | IEEE80211_IF_FILE(estab_plinks, u.mesh.mshstats.estab_plinks, ATOMIC); | 474 | IEEE80211_IF_FILE(estab_plinks, u.mesh.mshstats.estab_plinks, ATOMIC); |
475 | 475 | ||
476 | /* Mesh parameters */ | 476 | /* Mesh parameters */ |
477 | IEEE80211_IF_FILE(dot11MeshMaxRetries, | 477 | IEEE80211_IF_FILE(dot11MeshMaxRetries, |
478 | u.mesh.mshcfg.dot11MeshMaxRetries, DEC); | 478 | u.mesh.mshcfg.dot11MeshMaxRetries, DEC); |
479 | IEEE80211_IF_FILE(dot11MeshRetryTimeout, | 479 | IEEE80211_IF_FILE(dot11MeshRetryTimeout, |
480 | u.mesh.mshcfg.dot11MeshRetryTimeout, DEC); | 480 | u.mesh.mshcfg.dot11MeshRetryTimeout, DEC); |
481 | IEEE80211_IF_FILE(dot11MeshConfirmTimeout, | 481 | IEEE80211_IF_FILE(dot11MeshConfirmTimeout, |
482 | u.mesh.mshcfg.dot11MeshConfirmTimeout, DEC); | 482 | u.mesh.mshcfg.dot11MeshConfirmTimeout, DEC); |
483 | IEEE80211_IF_FILE(dot11MeshHoldingTimeout, | 483 | IEEE80211_IF_FILE(dot11MeshHoldingTimeout, |
484 | u.mesh.mshcfg.dot11MeshHoldingTimeout, DEC); | 484 | u.mesh.mshcfg.dot11MeshHoldingTimeout, DEC); |
485 | IEEE80211_IF_FILE(dot11MeshTTL, u.mesh.mshcfg.dot11MeshTTL, DEC); | 485 | IEEE80211_IF_FILE(dot11MeshTTL, u.mesh.mshcfg.dot11MeshTTL, DEC); |
486 | IEEE80211_IF_FILE(element_ttl, u.mesh.mshcfg.element_ttl, DEC); | 486 | IEEE80211_IF_FILE(element_ttl, u.mesh.mshcfg.element_ttl, DEC); |
487 | IEEE80211_IF_FILE(auto_open_plinks, u.mesh.mshcfg.auto_open_plinks, DEC); | 487 | IEEE80211_IF_FILE(auto_open_plinks, u.mesh.mshcfg.auto_open_plinks, DEC); |
488 | IEEE80211_IF_FILE(dot11MeshMaxPeerLinks, | 488 | IEEE80211_IF_FILE(dot11MeshMaxPeerLinks, |
489 | u.mesh.mshcfg.dot11MeshMaxPeerLinks, DEC); | 489 | u.mesh.mshcfg.dot11MeshMaxPeerLinks, DEC); |
490 | IEEE80211_IF_FILE(dot11MeshHWMPactivePathTimeout, | 490 | IEEE80211_IF_FILE(dot11MeshHWMPactivePathTimeout, |
491 | u.mesh.mshcfg.dot11MeshHWMPactivePathTimeout, DEC); | 491 | u.mesh.mshcfg.dot11MeshHWMPactivePathTimeout, DEC); |
492 | IEEE80211_IF_FILE(dot11MeshHWMPpreqMinInterval, | 492 | IEEE80211_IF_FILE(dot11MeshHWMPpreqMinInterval, |
493 | u.mesh.mshcfg.dot11MeshHWMPpreqMinInterval, DEC); | 493 | u.mesh.mshcfg.dot11MeshHWMPpreqMinInterval, DEC); |
494 | IEEE80211_IF_FILE(dot11MeshHWMPperrMinInterval, | 494 | IEEE80211_IF_FILE(dot11MeshHWMPperrMinInterval, |
495 | u.mesh.mshcfg.dot11MeshHWMPperrMinInterval, DEC); | 495 | u.mesh.mshcfg.dot11MeshHWMPperrMinInterval, DEC); |
496 | IEEE80211_IF_FILE(dot11MeshHWMPnetDiameterTraversalTime, | 496 | IEEE80211_IF_FILE(dot11MeshHWMPnetDiameterTraversalTime, |
497 | u.mesh.mshcfg.dot11MeshHWMPnetDiameterTraversalTime, DEC); | 497 | u.mesh.mshcfg.dot11MeshHWMPnetDiameterTraversalTime, DEC); |
498 | IEEE80211_IF_FILE(dot11MeshHWMPmaxPREQretries, | 498 | IEEE80211_IF_FILE(dot11MeshHWMPmaxPREQretries, |
499 | u.mesh.mshcfg.dot11MeshHWMPmaxPREQretries, DEC); | 499 | u.mesh.mshcfg.dot11MeshHWMPmaxPREQretries, DEC); |
500 | IEEE80211_IF_FILE(path_refresh_time, | 500 | IEEE80211_IF_FILE(path_refresh_time, |
501 | u.mesh.mshcfg.path_refresh_time, DEC); | 501 | u.mesh.mshcfg.path_refresh_time, DEC); |
502 | IEEE80211_IF_FILE(min_discovery_timeout, | 502 | IEEE80211_IF_FILE(min_discovery_timeout, |
503 | u.mesh.mshcfg.min_discovery_timeout, DEC); | 503 | u.mesh.mshcfg.min_discovery_timeout, DEC); |
504 | IEEE80211_IF_FILE(dot11MeshHWMPRootMode, | 504 | IEEE80211_IF_FILE(dot11MeshHWMPRootMode, |
505 | u.mesh.mshcfg.dot11MeshHWMPRootMode, DEC); | 505 | u.mesh.mshcfg.dot11MeshHWMPRootMode, DEC); |
506 | IEEE80211_IF_FILE(dot11MeshGateAnnouncementProtocol, | 506 | IEEE80211_IF_FILE(dot11MeshGateAnnouncementProtocol, |
507 | u.mesh.mshcfg.dot11MeshGateAnnouncementProtocol, DEC); | 507 | u.mesh.mshcfg.dot11MeshGateAnnouncementProtocol, DEC); |
508 | IEEE80211_IF_FILE(dot11MeshHWMPRannInterval, | 508 | IEEE80211_IF_FILE(dot11MeshHWMPRannInterval, |
509 | u.mesh.mshcfg.dot11MeshHWMPRannInterval, DEC); | 509 | u.mesh.mshcfg.dot11MeshHWMPRannInterval, DEC); |
510 | IEEE80211_IF_FILE(dot11MeshForwarding, u.mesh.mshcfg.dot11MeshForwarding, DEC); | 510 | IEEE80211_IF_FILE(dot11MeshForwarding, u.mesh.mshcfg.dot11MeshForwarding, DEC); |
511 | IEEE80211_IF_FILE(rssi_threshold, u.mesh.mshcfg.rssi_threshold, DEC); | 511 | IEEE80211_IF_FILE(rssi_threshold, u.mesh.mshcfg.rssi_threshold, DEC); |
512 | IEEE80211_IF_FILE(ht_opmode, u.mesh.mshcfg.ht_opmode, DEC); | 512 | IEEE80211_IF_FILE(ht_opmode, u.mesh.mshcfg.ht_opmode, DEC); |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 7ae54b82291f..dd94ee5fb40a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -115,7 +115,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { | |||
115 | [NL80211_ATTR_STA_VLAN] = { .type = NLA_U32 }, | 115 | [NL80211_ATTR_STA_VLAN] = { .type = NLA_U32 }, |
116 | [NL80211_ATTR_MNTR_FLAGS] = { /* NLA_NESTED can't be empty */ }, | 116 | [NL80211_ATTR_MNTR_FLAGS] = { /* NLA_NESTED can't be empty */ }, |
117 | [NL80211_ATTR_MESH_ID] = { .type = NLA_BINARY, | 117 | [NL80211_ATTR_MESH_ID] = { .type = NLA_BINARY, |
118 | .len = IEEE80211_MAX_MESH_ID_LEN }, | 118 | .len = IEEE80211_MAX_MESH_ID_LEN }, |
119 | [NL80211_ATTR_MPATH_NEXT_HOP] = { .type = NLA_U32 }, | 119 | [NL80211_ATTR_MPATH_NEXT_HOP] = { .type = NLA_U32 }, |
120 | 120 | ||
121 | [NL80211_ATTR_REG_ALPHA2] = { .type = NLA_STRING, .len = 2 }, | 121 | [NL80211_ATTR_REG_ALPHA2] = { .type = NLA_STRING, .len = 2 }, |
@@ -3492,7 +3492,6 @@ static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_A | |||
3492 | [NL80211_MESHCONF_ELEMENT_TTL] = { .type = NLA_U8 }, | 3492 | [NL80211_MESHCONF_ELEMENT_TTL] = { .type = NLA_U8 }, |
3493 | [NL80211_MESHCONF_AUTO_OPEN_PLINKS] = { .type = NLA_U8 }, | 3493 | [NL80211_MESHCONF_AUTO_OPEN_PLINKS] = { .type = NLA_U8 }, |
3494 | [NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR] = { .type = NLA_U32 }, | 3494 | [NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR] = { .type = NLA_U32 }, |
3495 | |||
3496 | [NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES] = { .type = NLA_U8 }, | 3495 | [NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES] = { .type = NLA_U8 }, |
3497 | [NL80211_MESHCONF_PATH_REFRESH_TIME] = { .type = NLA_U32 }, | 3496 | [NL80211_MESHCONF_PATH_REFRESH_TIME] = { .type = NLA_U32 }, |
3498 | [NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT] = { .type = NLA_U16 }, | 3497 | [NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT] = { .type = NLA_U16 }, |
@@ -3504,8 +3503,8 @@ static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_A | |||
3504 | [NL80211_MESHCONF_HWMP_RANN_INTERVAL] = { .type = NLA_U16 }, | 3503 | [NL80211_MESHCONF_HWMP_RANN_INTERVAL] = { .type = NLA_U16 }, |
3505 | [NL80211_MESHCONF_GATE_ANNOUNCEMENTS] = { .type = NLA_U8 }, | 3504 | [NL80211_MESHCONF_GATE_ANNOUNCEMENTS] = { .type = NLA_U8 }, |
3506 | [NL80211_MESHCONF_FORWARDING] = { .type = NLA_U8 }, | 3505 | [NL80211_MESHCONF_FORWARDING] = { .type = NLA_U8 }, |
3507 | [NL80211_MESHCONF_RSSI_THRESHOLD] = { .type = NLA_U32}, | 3506 | [NL80211_MESHCONF_RSSI_THRESHOLD] = { .type = NLA_U32 }, |
3508 | [NL80211_MESHCONF_HT_OPMODE] = { .type = NLA_U16}, | 3507 | [NL80211_MESHCONF_HT_OPMODE] = { .type = NLA_U16 }, |
3509 | }; | 3508 | }; |
3510 | 3509 | ||
3511 | static const struct nla_policy | 3510 | static const struct nla_policy |
@@ -3515,7 +3514,7 @@ static const struct nla_policy | |||
3515 | [NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC] = { .type = NLA_U8 }, | 3514 | [NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC] = { .type = NLA_U8 }, |
3516 | [NL80211_MESH_SETUP_USERSPACE_AUTH] = { .type = NLA_FLAG }, | 3515 | [NL80211_MESH_SETUP_USERSPACE_AUTH] = { .type = NLA_FLAG }, |
3517 | [NL80211_MESH_SETUP_IE] = { .type = NLA_BINARY, | 3516 | [NL80211_MESH_SETUP_IE] = { .type = NLA_BINARY, |
3518 | .len = IEEE80211_MAX_DATA_LEN }, | 3517 | .len = IEEE80211_MAX_DATA_LEN }, |
3519 | [NL80211_MESH_SETUP_USERSPACE_AMPE] = { .type = NLA_FLAG }, | 3518 | [NL80211_MESH_SETUP_USERSPACE_AMPE] = { .type = NLA_FLAG }, |
3520 | }; | 3519 | }; |
3521 | 3520 | ||
@@ -3548,63 +3547,71 @@ do {\ | |||
3548 | 3547 | ||
3549 | /* Fill in the params struct */ | 3548 | /* Fill in the params struct */ |
3550 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshRetryTimeout, | 3549 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshRetryTimeout, |
3551 | mask, NL80211_MESHCONF_RETRY_TIMEOUT, nla_get_u16); | 3550 | mask, NL80211_MESHCONF_RETRY_TIMEOUT, |
3551 | nla_get_u16); | ||
3552 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshConfirmTimeout, | 3552 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshConfirmTimeout, |
3553 | mask, NL80211_MESHCONF_CONFIRM_TIMEOUT, nla_get_u16); | 3553 | mask, NL80211_MESHCONF_CONFIRM_TIMEOUT, |
3554 | nla_get_u16); | ||
3554 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHoldingTimeout, | 3555 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHoldingTimeout, |
3555 | mask, NL80211_MESHCONF_HOLDING_TIMEOUT, nla_get_u16); | 3556 | mask, NL80211_MESHCONF_HOLDING_TIMEOUT, |
3557 | nla_get_u16); | ||
3556 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshMaxPeerLinks, | 3558 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshMaxPeerLinks, |
3557 | mask, NL80211_MESHCONF_MAX_PEER_LINKS, nla_get_u16); | 3559 | mask, NL80211_MESHCONF_MAX_PEER_LINKS, |
3560 | nla_get_u16); | ||
3558 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshMaxRetries, | 3561 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshMaxRetries, |
3559 | mask, NL80211_MESHCONF_MAX_RETRIES, nla_get_u8); | 3562 | mask, NL80211_MESHCONF_MAX_RETRIES, |
3563 | nla_get_u8); | ||
3560 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshTTL, | 3564 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshTTL, |
3561 | mask, NL80211_MESHCONF_TTL, nla_get_u8); | 3565 | mask, NL80211_MESHCONF_TTL, nla_get_u8); |
3562 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, element_ttl, | 3566 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, element_ttl, |
3563 | mask, NL80211_MESHCONF_ELEMENT_TTL, nla_get_u8); | 3567 | mask, NL80211_MESHCONF_ELEMENT_TTL, |
3568 | nla_get_u8); | ||
3564 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, auto_open_plinks, | 3569 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, auto_open_plinks, |
3565 | mask, NL80211_MESHCONF_AUTO_OPEN_PLINKS, nla_get_u8); | 3570 | mask, NL80211_MESHCONF_AUTO_OPEN_PLINKS, |
3566 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshNbrOffsetMaxNeighbor, | 3571 | nla_get_u8); |
3567 | mask, NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, | 3572 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshNbrOffsetMaxNeighbor, mask, |
3568 | nla_get_u32); | 3573 | NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, |
3574 | nla_get_u32); | ||
3569 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPmaxPREQretries, | 3575 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPmaxPREQretries, |
3570 | mask, NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES, | 3576 | mask, NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES, |
3571 | nla_get_u8); | 3577 | nla_get_u8); |
3572 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, path_refresh_time, | 3578 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, path_refresh_time, |
3573 | mask, NL80211_MESHCONF_PATH_REFRESH_TIME, nla_get_u32); | 3579 | mask, NL80211_MESHCONF_PATH_REFRESH_TIME, |
3580 | nla_get_u32); | ||
3574 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, min_discovery_timeout, | 3581 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, min_discovery_timeout, |
3575 | mask, NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT, | 3582 | mask, NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT, |
3576 | nla_get_u16); | 3583 | nla_get_u16); |
3577 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPactivePathTimeout, | 3584 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPactivePathTimeout, mask, |
3578 | mask, NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT, | 3585 | NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT, |
3579 | nla_get_u32); | 3586 | nla_get_u32); |
3580 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPpreqMinInterval, | 3587 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPpreqMinInterval, |
3581 | mask, NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, | 3588 | mask, NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, |
3582 | nla_get_u16); | 3589 | nla_get_u16); |
3583 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPperrMinInterval, | 3590 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPperrMinInterval, |
3584 | mask, NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL, | 3591 | mask, NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL, |
3585 | nla_get_u16); | 3592 | nla_get_u16); |
3586 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, | ||
3587 | dot11MeshHWMPnetDiameterTraversalTime, | ||
3588 | mask, NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, | ||
3589 | nla_get_u16); | ||
3590 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, | ||
3591 | dot11MeshHWMPRootMode, mask, | ||
3592 | NL80211_MESHCONF_HWMP_ROOTMODE, | ||
3593 | nla_get_u8); | ||
3594 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, | 3593 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, |
3595 | dot11MeshHWMPRannInterval, mask, | 3594 | dot11MeshHWMPnetDiameterTraversalTime, mask, |
3596 | NL80211_MESHCONF_HWMP_RANN_INTERVAL, | 3595 | NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, |
3597 | nla_get_u16); | 3596 | nla_get_u16); |
3597 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPRootMode, mask, | ||
3598 | NL80211_MESHCONF_HWMP_ROOTMODE, nla_get_u8); | ||
3599 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPRannInterval, mask, | ||
3600 | NL80211_MESHCONF_HWMP_RANN_INTERVAL, | ||
3601 | nla_get_u16); | ||
3598 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, | 3602 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, |
3599 | dot11MeshGateAnnouncementProtocol, mask, | 3603 | dot11MeshGateAnnouncementProtocol, mask, |
3600 | NL80211_MESHCONF_GATE_ANNOUNCEMENTS, | 3604 | NL80211_MESHCONF_GATE_ANNOUNCEMENTS, |
3601 | nla_get_u8); | 3605 | nla_get_u8); |
3602 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshForwarding, | 3606 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshForwarding, |
3603 | mask, NL80211_MESHCONF_FORWARDING, nla_get_u8); | 3607 | mask, NL80211_MESHCONF_FORWARDING, |
3608 | nla_get_u8); | ||
3604 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, | 3609 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, |
3605 | mask, NL80211_MESHCONF_RSSI_THRESHOLD, nla_get_u32); | 3610 | mask, NL80211_MESHCONF_RSSI_THRESHOLD, |
3611 | nla_get_u32); | ||
3606 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode, | 3612 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode, |
3607 | mask, NL80211_MESHCONF_HT_OPMODE, nla_get_u16); | 3613 | mask, NL80211_MESHCONF_HT_OPMODE, |
3614 | nla_get_u16); | ||
3608 | if (mask_out) | 3615 | if (mask_out) |
3609 | *mask_out = mask; | 3616 | *mask_out = mask; |
3610 | 3617 | ||