diff options
| author | David S. Miller <davem@davemloft.net> | 2008-03-11 22:17:18 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2008-03-11 22:17:18 -0400 |
| commit | ba73d4c84a7344f1b5635c2b4e96796e8c13a126 (patch) | |
| tree | d4a3e2cfc5f3a046a2b9baa898f0c201c75ba898 /include/net | |
| parent | b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551 (diff) | |
| parent | deedf504302ff747985db081352e045ff7087a11 (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.26
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/cfg80211.h | 139 | ||||
| -rw-r--r-- | include/net/mac80211.h | 106 |
2 files changed, 194 insertions, 51 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index ab4caf63954f..e00750836ba5 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -12,6 +12,16 @@ | |||
| 12 | * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net> | 12 | * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net> |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | /** | ||
| 16 | * struct vif_params - describes virtual interface parameters | ||
| 17 | * @mesh_id: mesh ID to use | ||
| 18 | * @mesh_id_len: length of the mesh ID | ||
| 19 | */ | ||
| 20 | struct vif_params { | ||
| 21 | u8 *mesh_id; | ||
| 22 | int mesh_id_len; | ||
| 23 | }; | ||
| 24 | |||
| 15 | /* Radiotap header iteration | 25 | /* Radiotap header iteration |
| 16 | * implemented in net/wireless/radiotap.c | 26 | * implemented in net/wireless/radiotap.c |
| 17 | * docs in Documentation/networking/radiotap-headers.txt | 27 | * docs in Documentation/networking/radiotap-headers.txt |
| @@ -109,6 +119,19 @@ enum station_flags { | |||
| 109 | }; | 119 | }; |
| 110 | 120 | ||
| 111 | /** | 121 | /** |
| 122 | * enum plink_action - actions to perform in mesh peers | ||
| 123 | * | ||
| 124 | * @PLINK_ACTION_INVALID: action 0 is reserved | ||
| 125 | * @PLINK_ACTION_OPEN: start mesh peer link establishment | ||
| 126 | * @PLINK_ACTION_BLOCL: block traffic from this mesh peer | ||
| 127 | */ | ||
| 128 | enum plink_actions { | ||
| 129 | PLINK_ACTION_INVALID, | ||
| 130 | PLINK_ACTION_OPEN, | ||
| 131 | PLINK_ACTION_BLOCK, | ||
| 132 | }; | ||
| 133 | |||
| 134 | /** | ||
| 112 | * struct station_parameters - station parameters | 135 | * struct station_parameters - station parameters |
| 113 | * | 136 | * |
| 114 | * Used to change and create a new station. | 137 | * Used to change and create a new station. |
| @@ -128,39 +151,52 @@ struct station_parameters { | |||
| 128 | int listen_interval; | 151 | int listen_interval; |
| 129 | u16 aid; | 152 | u16 aid; |
| 130 | u8 supported_rates_len; | 153 | u8 supported_rates_len; |
| 154 | u8 plink_action; | ||
| 131 | }; | 155 | }; |
| 132 | 156 | ||
| 133 | /** | 157 | /** |
| 134 | * enum station_stats_flags - station statistics flags | 158 | * enum station_info_flags - station information flags |
| 135 | * | 159 | * |
| 136 | * Used by the driver to indicate which info in &struct station_stats | 160 | * Used by the driver to indicate which info in &struct station_info |
| 137 | * it has filled in during get_station(). | 161 | * it has filled in during get_station() or dump_station(). |
| 138 | * | 162 | * |
| 139 | * @STATION_STAT_INACTIVE_TIME: @inactive_time filled | 163 | * @STATION_INFO_INACTIVE_TIME: @inactive_time filled |
| 140 | * @STATION_STAT_RX_BYTES: @rx_bytes filled | 164 | * @STATION_INFO_RX_BYTES: @rx_bytes filled |
| 141 | * @STATION_STAT_TX_BYTES: @tx_bytes filled | 165 | * @STATION_INFO_TX_BYTES: @tx_bytes filled |
| 166 | * @STATION_INFO_LLID: @llid filled | ||
| 167 | * @STATION_INFO_PLID: @plid filled | ||
| 168 | * @STATION_INFO_PLINK_STATE: @plink_state filled | ||
| 142 | */ | 169 | */ |
| 143 | enum station_stats_flags { | 170 | enum station_info_flags { |
| 144 | STATION_STAT_INACTIVE_TIME = 1<<0, | 171 | STATION_INFO_INACTIVE_TIME = 1<<0, |
| 145 | STATION_STAT_RX_BYTES = 1<<1, | 172 | STATION_INFO_RX_BYTES = 1<<1, |
| 146 | STATION_STAT_TX_BYTES = 1<<2, | 173 | STATION_INFO_TX_BYTES = 1<<2, |
| 174 | STATION_INFO_LLID = 1<<3, | ||
| 175 | STATION_INFO_PLID = 1<<4, | ||
| 176 | STATION_INFO_PLINK_STATE = 1<<5, | ||
| 147 | }; | 177 | }; |
| 148 | 178 | ||
| 149 | /** | 179 | /** |
| 150 | * struct station_stats - station statistics | 180 | * struct station_info - station information |
| 151 | * | 181 | * |
| 152 | * Station information filled by driver for get_station(). | 182 | * Station information filled by driver for get_station() and dump_station. |
| 153 | * | 183 | * |
| 154 | * @filled: bitflag of flags from &enum station_stats_flags | 184 | * @filled: bitflag of flags from &enum station_info_flags |
| 155 | * @inactive_time: time since last station activity (tx/rx) in milliseconds | 185 | * @inactive_time: time since last station activity (tx/rx) in milliseconds |
| 156 | * @rx_bytes: bytes received from this station | 186 | * @rx_bytes: bytes received from this station |
| 157 | * @tx_bytes: bytes transmitted to this station | 187 | * @tx_bytes: bytes transmitted to this station |
| 188 | * @llid: mesh local link id | ||
| 189 | * @plid: mesh peer link id | ||
| 190 | * @plink_state: mesh peer link state | ||
| 158 | */ | 191 | */ |
| 159 | struct station_stats { | 192 | struct station_info { |
| 160 | u32 filled; | 193 | u32 filled; |
| 161 | u32 inactive_time; | 194 | u32 inactive_time; |
| 162 | u32 rx_bytes; | 195 | u32 rx_bytes; |
| 163 | u32 tx_bytes; | 196 | u32 tx_bytes; |
| 197 | u16 llid; | ||
| 198 | u16 plid; | ||
| 199 | u8 plink_state; | ||
| 164 | }; | 200 | }; |
| 165 | 201 | ||
| 166 | /** | 202 | /** |
| @@ -183,6 +219,56 @@ enum monitor_flags { | |||
| 183 | MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES, | 219 | MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES, |
| 184 | }; | 220 | }; |
| 185 | 221 | ||
| 222 | /** | ||
| 223 | * enum mpath_info_flags - mesh path information flags | ||
| 224 | * | ||
| 225 | * Used by the driver to indicate which info in &struct mpath_info it has filled | ||
| 226 | * in during get_station() or dump_station(). | ||
| 227 | * | ||
| 228 | * MPATH_INFO_FRAME_QLEN: @frame_qlen filled | ||
| 229 | * MPATH_INFO_DSN: @dsn filled | ||
| 230 | * MPATH_INFO_METRIC: @metric filled | ||
| 231 | * MPATH_INFO_EXPTIME: @exptime filled | ||
| 232 | * MPATH_INFO_DISCOVERY_TIMEOUT: @discovery_timeout filled | ||
| 233 | * MPATH_INFO_DISCOVERY_RETRIES: @discovery_retries filled | ||
| 234 | * MPATH_INFO_FLAGS: @flags filled | ||
| 235 | */ | ||
| 236 | enum mpath_info_flags { | ||
| 237 | MPATH_INFO_FRAME_QLEN = BIT(0), | ||
| 238 | MPATH_INFO_DSN = BIT(1), | ||
| 239 | MPATH_INFO_METRIC = BIT(2), | ||
| 240 | MPATH_INFO_EXPTIME = BIT(3), | ||
| 241 | MPATH_INFO_DISCOVERY_TIMEOUT = BIT(4), | ||
| 242 | MPATH_INFO_DISCOVERY_RETRIES = BIT(5), | ||
| 243 | MPATH_INFO_FLAGS = BIT(6), | ||
| 244 | }; | ||
| 245 | |||
| 246 | /** | ||
| 247 | * struct mpath_info - mesh path information | ||
| 248 | * | ||
| 249 | * Mesh path information filled by driver for get_mpath() and dump_mpath(). | ||
| 250 | * | ||
| 251 | * @filled: bitfield of flags from &enum mpath_info_flags | ||
| 252 | * @frame_qlen: number of queued frames for this destination | ||
| 253 | * @dsn: destination sequence number | ||
| 254 | * @metric: metric (cost) of this mesh path | ||
| 255 | * @exptime: expiration time for the mesh path from now, in msecs | ||
| 256 | * @flags: mesh path flags | ||
| 257 | * @discovery_timeout: total mesh path discovery timeout, in msecs | ||
| 258 | * @discovery_retries: mesh path discovery retries | ||
| 259 | */ | ||
| 260 | struct mpath_info { | ||
| 261 | u32 filled; | ||
| 262 | u32 frame_qlen; | ||
| 263 | u32 dsn; | ||
| 264 | u32 metric; | ||
| 265 | u32 exptime; | ||
| 266 | u32 discovery_timeout; | ||
| 267 | u8 discovery_retries; | ||
| 268 | u8 flags; | ||
| 269 | }; | ||
| 270 | |||
| 271 | |||
| 186 | /* from net/wireless.h */ | 272 | /* from net/wireless.h */ |
| 187 | struct wiphy; | 273 | struct wiphy; |
| 188 | 274 | ||
| @@ -230,13 +316,17 @@ struct wiphy; | |||
| 230 | * @del_station: Remove a station; @mac may be NULL to remove all stations. | 316 | * @del_station: Remove a station; @mac may be NULL to remove all stations. |
| 231 | * | 317 | * |
| 232 | * @change_station: Modify a given station. | 318 | * @change_station: Modify a given station. |
| 319 | * | ||
| 320 | * @set_mesh_cfg: set mesh parameters (by now, just mesh id) | ||
| 233 | */ | 321 | */ |
| 234 | struct cfg80211_ops { | 322 | struct cfg80211_ops { |
| 235 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, | 323 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, |
| 236 | enum nl80211_iftype type, u32 *flags); | 324 | enum nl80211_iftype type, u32 *flags, |
| 325 | struct vif_params *params); | ||
| 237 | int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex); | 326 | int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex); |
| 238 | int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex, | 327 | int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex, |
| 239 | enum nl80211_iftype type, u32 *flags); | 328 | enum nl80211_iftype type, u32 *flags, |
| 329 | struct vif_params *params); | ||
| 240 | 330 | ||
| 241 | int (*add_key)(struct wiphy *wiphy, struct net_device *netdev, | 331 | int (*add_key)(struct wiphy *wiphy, struct net_device *netdev, |
| 242 | u8 key_index, u8 *mac_addr, | 332 | u8 key_index, u8 *mac_addr, |
| @@ -264,7 +354,22 @@ struct cfg80211_ops { | |||
| 264 | int (*change_station)(struct wiphy *wiphy, struct net_device *dev, | 354 | int (*change_station)(struct wiphy *wiphy, struct net_device *dev, |
| 265 | u8 *mac, struct station_parameters *params); | 355 | u8 *mac, struct station_parameters *params); |
| 266 | int (*get_station)(struct wiphy *wiphy, struct net_device *dev, | 356 | int (*get_station)(struct wiphy *wiphy, struct net_device *dev, |
| 267 | u8 *mac, struct station_stats *stats); | 357 | u8 *mac, struct station_info *sinfo); |
| 358 | int (*dump_station)(struct wiphy *wiphy, struct net_device *dev, | ||
| 359 | int idx, u8 *mac, struct station_info *sinfo); | ||
| 360 | |||
| 361 | int (*add_mpath)(struct wiphy *wiphy, struct net_device *dev, | ||
| 362 | u8 *dst, u8 *next_hop); | ||
| 363 | int (*del_mpath)(struct wiphy *wiphy, struct net_device *dev, | ||
| 364 | u8 *dst); | ||
| 365 | int (*change_mpath)(struct wiphy *wiphy, struct net_device *dev, | ||
| 366 | u8 *dst, u8 *next_hop); | ||
| 367 | int (*get_mpath)(struct wiphy *wiphy, struct net_device *dev, | ||
| 368 | u8 *dst, u8 *next_hop, | ||
| 369 | struct mpath_info *pinfo); | ||
| 370 | int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev, | ||
| 371 | int idx, u8 *dst, u8 *next_hop, | ||
| 372 | struct mpath_info *pinfo); | ||
| 268 | }; | 373 | }; |
| 269 | 374 | ||
| 270 | #endif /* __NET_CFG80211_H */ | 375 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 7a80c3981237..5ab6a350ee6d 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -205,6 +205,62 @@ struct ieee80211_bss_conf { | |||
| 205 | bool use_short_preamble; | 205 | bool use_short_preamble; |
| 206 | }; | 206 | }; |
| 207 | 207 | ||
| 208 | /** | ||
| 209 | * enum mac80211_tx_control_flags - flags to describe Tx configuration for | ||
| 210 | * the Tx frame | ||
| 211 | * | ||
| 212 | * These flags are used with the @flags member of &ieee80211_tx_control | ||
| 213 | * | ||
| 214 | * @IEEE80211_TXCTL_REQ_TX_STATUS: request TX status callback for this frame. | ||
| 215 | * @IEEE80211_TXCTL_DO_NOT_ENCRYPT: send this frame without encryption; | ||
| 216 | * e.g., for EAPOL frame | ||
| 217 | * @IEEE80211_TXCTL_USE_RTS_CTS: use RTS-CTS before sending frame | ||
| 218 | * @IEEE80211_TXCTL_USE_CTS_PROTECT: use CTS protection for the frame (e.g., | ||
| 219 | * for combined 802.11g / 802.11b networks) | ||
| 220 | * @IEEE80211_TXCTL_NO_ACK: tell the low level not to wait for an ack | ||
| 221 | * @IEEE80211_TXCTL_RATE_CTRL_PROBE | ||
| 222 | * @EEE80211_TXCTL_CLEAR_PS_FILT: clear powersave filter | ||
| 223 | * for destination station | ||
| 224 | * @IEEE80211_TXCTL_REQUEUE: | ||
| 225 | * @IEEE80211_TXCTL_FIRST_FRAGMENT: this is a first fragment of the frame | ||
| 226 | * @IEEE80211_TXCTL_LONG_RETRY_LIMIT: this frame should be send using the | ||
| 227 | * through set_retry_limit configured long | ||
| 228 | * retry value | ||
| 229 | * @IEEE80211_TXCTL_EAPOL_FRAME: internal to mac80211 | ||
| 230 | * @IEEE80211_TXCTL_SEND_AFTER_DTIM: send this frame after DTIM beacon | ||
| 231 | * @IEEE80211_TXCTL_AMPDU: this frame should be sent as part of an A-MPDU | ||
| 232 | * @IEEE80211_TXCTL_OFDM_HT: this frame can be sent in HT OFDM rates. number | ||
| 233 | * of streams when this flag is on can be extracted | ||
| 234 | * from antenna_sel_tx, so if 1 antenna is marked | ||
| 235 | * use SISO, 2 antennas marked use MIMO, n antennas | ||
| 236 | * marked use MIMO_n. | ||
| 237 | * @IEEE80211_TXCTL_GREEN_FIELD: use green field protection for this frame | ||
| 238 | * @IEEE80211_TXCTL_40_MHZ_WIDTH: send this frame using 40 Mhz channel width | ||
| 239 | * @IEEE80211_TXCTL_DUP_DATA: duplicate data frame on both 20 Mhz channels | ||
| 240 | * @IEEE80211_TXCTL_SHORT_GI: send this frame using short guard interval | ||
| 241 | */ | ||
| 242 | enum mac80211_tx_control_flags { | ||
| 243 | IEEE80211_TXCTL_REQ_TX_STATUS = (1<<0), | ||
| 244 | IEEE80211_TXCTL_DO_NOT_ENCRYPT = (1<<1), | ||
| 245 | IEEE80211_TXCTL_USE_RTS_CTS = (1<<2), | ||
| 246 | IEEE80211_TXCTL_USE_CTS_PROTECT = (1<<3), | ||
| 247 | IEEE80211_TXCTL_NO_ACK = (1<<4), | ||
| 248 | IEEE80211_TXCTL_RATE_CTRL_PROBE = (1<<5), | ||
| 249 | IEEE80211_TXCTL_CLEAR_PS_FILT = (1<<6), | ||
| 250 | IEEE80211_TXCTL_REQUEUE = (1<<7), | ||
| 251 | IEEE80211_TXCTL_FIRST_FRAGMENT = (1<<8), | ||
| 252 | IEEE80211_TXCTL_SHORT_PREAMBLE = (1<<9), | ||
| 253 | IEEE80211_TXCTL_LONG_RETRY_LIMIT = (1<<10), | ||
| 254 | IEEE80211_TXCTL_EAPOL_FRAME = (1<<11), | ||
| 255 | IEEE80211_TXCTL_SEND_AFTER_DTIM = (1<<12), | ||
| 256 | IEEE80211_TXCTL_AMPDU = (1<<13), | ||
| 257 | IEEE80211_TXCTL_OFDM_HT = (1<<14), | ||
| 258 | IEEE80211_TXCTL_GREEN_FIELD = (1<<15), | ||
| 259 | IEEE80211_TXCTL_40_MHZ_WIDTH = (1<<16), | ||
| 260 | IEEE80211_TXCTL_DUP_DATA = (1<<17), | ||
| 261 | IEEE80211_TXCTL_SHORT_GI = (1<<18), | ||
| 262 | }; | ||
| 263 | |||
| 208 | /* Transmit control fields. This data structure is passed to low-level driver | 264 | /* Transmit control fields. This data structure is passed to low-level driver |
| 209 | * with each TX frame. The low-level driver is responsible for configuring | 265 | * with each TX frame. The low-level driver is responsible for configuring |
| 210 | * the hardware to use given values (depending on what is supported). */ | 266 | * the hardware to use given values (depending on what is supported). */ |
| @@ -219,42 +275,14 @@ struct ieee80211_tx_control { | |||
| 219 | /* retry rate for the last retries */ | 275 | /* retry rate for the last retries */ |
| 220 | struct ieee80211_rate *alt_retry_rate; | 276 | struct ieee80211_rate *alt_retry_rate; |
| 221 | 277 | ||
| 222 | #define IEEE80211_TXCTL_REQ_TX_STATUS (1<<0)/* request TX status callback for | 278 | u32 flags; /* tx control flags defined above */ |
| 223 | * this frame */ | ||
| 224 | #define IEEE80211_TXCTL_DO_NOT_ENCRYPT (1<<1) /* send this frame without | ||
| 225 | * encryption; e.g., for EAPOL | ||
| 226 | * frames */ | ||
| 227 | #define IEEE80211_TXCTL_USE_RTS_CTS (1<<2) /* use RTS-CTS before sending | ||
| 228 | * frame */ | ||
| 229 | #define IEEE80211_TXCTL_USE_CTS_PROTECT (1<<3) /* use CTS protection for the | ||
| 230 | * frame (e.g., for combined | ||
| 231 | * 802.11g / 802.11b networks) */ | ||
| 232 | #define IEEE80211_TXCTL_NO_ACK (1<<4) /* tell the low level not to | ||
| 233 | * wait for an ack */ | ||
| 234 | #define IEEE80211_TXCTL_RATE_CTRL_PROBE (1<<5) | ||
| 235 | #define IEEE80211_TXCTL_CLEAR_PS_FILT (1<<6) /* clear powersave filter | ||
| 236 | * for destination station */ | ||
| 237 | #define IEEE80211_TXCTL_REQUEUE (1<<7) | ||
| 238 | #define IEEE80211_TXCTL_FIRST_FRAGMENT (1<<8) /* this is a first fragment of | ||
| 239 | * the frame */ | ||
| 240 | #define IEEE80211_TXCTL_SHORT_PREAMBLE (1<<9) | ||
| 241 | #define IEEE80211_TXCTL_LONG_RETRY_LIMIT (1<<10) /* this frame should be send | ||
| 242 | * using the through | ||
| 243 | * set_retry_limit configured | ||
| 244 | * long retry value */ | ||
| 245 | #define IEEE80211_TXCTL_EAPOL_FRAME (1<<11) /* internal to mac80211 */ | ||
| 246 | #define IEEE80211_TXCTL_SEND_AFTER_DTIM (1<<12) /* send this frame after DTIM | ||
| 247 | * beacon */ | ||
| 248 | #define IEEE80211_TXCTL_AMPDU (1<<13) /* this frame should be sent | ||
| 249 | * as part of an A-MPDU */ | ||
| 250 | u32 flags; /* tx control flags defined | ||
| 251 | * above */ | ||
| 252 | u8 key_idx; /* keyidx from hw->set_key(), undefined if | 279 | u8 key_idx; /* keyidx from hw->set_key(), undefined if |
| 253 | * IEEE80211_TXCTL_DO_NOT_ENCRYPT is set */ | 280 | * IEEE80211_TXCTL_DO_NOT_ENCRYPT is set */ |
| 254 | u8 retry_limit; /* 1 = only first attempt, 2 = one retry, .. | 281 | u8 retry_limit; /* 1 = only first attempt, 2 = one retry, .. |
| 255 | * This could be used when set_retry_limit | 282 | * This could be used when set_retry_limit |
| 256 | * is not implemented by the driver */ | 283 | * is not implemented by the driver */ |
| 257 | u8 antenna_sel_tx; /* 0 = default/diversity, 1 = Ant0, 2 = Ant1 */ | 284 | u8 antenna_sel_tx; /* 0 = default/diversity, otherwise bit |
| 285 | * position represents antenna number used */ | ||
| 258 | u8 icv_len; /* length of the ICV/MIC field in octets */ | 286 | u8 icv_len; /* length of the ICV/MIC field in octets */ |
| 259 | u8 iv_len; /* length of the IV field in octets */ | 287 | u8 iv_len; /* length of the IV field in octets */ |
| 260 | u8 queue; /* hardware queue to use for this frame; | 288 | u8 queue; /* hardware queue to use for this frame; |
| @@ -407,7 +435,6 @@ enum ieee80211_conf_flags { | |||
| 407 | * @channel: the channel to tune to | 435 | * @channel: the channel to tune to |
| 408 | */ | 436 | */ |
| 409 | struct ieee80211_conf { | 437 | struct ieee80211_conf { |
| 410 | unsigned int regulatory_domain; | ||
| 411 | int radio_enabled; | 438 | int radio_enabled; |
| 412 | 439 | ||
| 413 | int beacon_int; | 440 | int beacon_int; |
| @@ -437,12 +464,14 @@ struct ieee80211_conf { | |||
| 437 | * @IEEE80211_IF_TYPE_WDS: interface in WDS mode. | 464 | * @IEEE80211_IF_TYPE_WDS: interface in WDS mode. |
| 438 | * @IEEE80211_IF_TYPE_VLAN: VLAN interface bound to an AP, drivers | 465 | * @IEEE80211_IF_TYPE_VLAN: VLAN interface bound to an AP, drivers |
| 439 | * will never see this type. | 466 | * will never see this type. |
| 467 | * @IEEE80211_IF_TYPE_MESH_POINT: 802.11s mesh point | ||
| 440 | */ | 468 | */ |
| 441 | enum ieee80211_if_types { | 469 | enum ieee80211_if_types { |
| 442 | IEEE80211_IF_TYPE_INVALID, | 470 | IEEE80211_IF_TYPE_INVALID, |
| 443 | IEEE80211_IF_TYPE_AP, | 471 | IEEE80211_IF_TYPE_AP, |
| 444 | IEEE80211_IF_TYPE_STA, | 472 | IEEE80211_IF_TYPE_STA, |
| 445 | IEEE80211_IF_TYPE_IBSS, | 473 | IEEE80211_IF_TYPE_IBSS, |
| 474 | IEEE80211_IF_TYPE_MESH_POINT, | ||
| 446 | IEEE80211_IF_TYPE_MNTR, | 475 | IEEE80211_IF_TYPE_MNTR, |
| 447 | IEEE80211_IF_TYPE_WDS, | 476 | IEEE80211_IF_TYPE_WDS, |
| 448 | IEEE80211_IF_TYPE_VLAN, | 477 | IEEE80211_IF_TYPE_VLAN, |
| @@ -464,6 +493,14 @@ struct ieee80211_vif { | |||
| 464 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); | 493 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); |
| 465 | }; | 494 | }; |
| 466 | 495 | ||
| 496 | static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif) | ||
| 497 | { | ||
| 498 | #ifdef CONFIG_MAC80211_MESH | ||
| 499 | return vif->type == IEEE80211_IF_TYPE_MESH_POINT; | ||
| 500 | #endif | ||
| 501 | return false; | ||
| 502 | } | ||
| 503 | |||
| 467 | /** | 504 | /** |
| 468 | * struct ieee80211_if_init_conf - initial configuration of an interface | 505 | * struct ieee80211_if_init_conf - initial configuration of an interface |
| 469 | * | 506 | * |
| @@ -1087,8 +1124,9 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
| 1087 | /** | 1124 | /** |
| 1088 | * ieee80211_register_hw - Register hardware device | 1125 | * ieee80211_register_hw - Register hardware device |
| 1089 | * | 1126 | * |
| 1090 | * You must call this function before any other functions | 1127 | * You must call this function before any other functions in |
| 1091 | * except ieee80211_register_hwmode. | 1128 | * mac80211. Note that before a hardware can be registered, you |
| 1129 | * need to fill the contained wiphy's information. | ||
| 1092 | * | 1130 | * |
| 1093 | * @hw: the device to register as returned by ieee80211_alloc_hw() | 1131 | * @hw: the device to register as returned by ieee80211_alloc_hw() |
| 1094 | */ | 1132 | */ |
