OLD | NEW |
1 #ifndef __NET_CFG80211_H | 1 #ifndef __NET_CFG80211_H |
2 #define __NET_CFG80211_H | 2 #define __NET_CFG80211_H |
3 /* | 3 /* |
4 * 802.11 device and configuration interface | 4 * 802.11 device and configuration interface |
5 * | 5 * |
6 * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net> | 6 * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net> |
7 * | 7 * |
8 * This program is free software; you can redistribute it and/or modify | 8 * This program is free software; you can redistribute it and/or modify |
9 * it under the terms of the GNU General Public License version 2 as | 9 * it under the terms of the GNU General Public License version 2 as |
10 * published by the Free Software Foundation. | 10 * published by the Free Software Foundation. |
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 /** | 1200 /** |
1201 * enum wiphy_flags - wiphy capability flags | 1201 * enum wiphy_flags - wiphy capability flags |
1202 * | 1202 * |
1203 * @WIPHY_FLAG_CUSTOM_REGULATORY: tells us the driver for this device | 1203 * @WIPHY_FLAG_CUSTOM_REGULATORY: tells us the driver for this device |
1204 * has its own custom regulatory domain and cannot identify the | 1204 * has its own custom regulatory domain and cannot identify the |
1205 * ISO / IEC 3166 alpha2 it belongs to. When this is enabled | 1205 * ISO / IEC 3166 alpha2 it belongs to. When this is enabled |
1206 * we will disregard the first regulatory hint (when the | 1206 * we will disregard the first regulatory hint (when the |
1207 * initiator is %REGDOM_SET_BY_CORE). | 1207 * initiator is %REGDOM_SET_BY_CORE). |
1208 * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will | 1208 * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will |
1209 * ignore regulatory domain settings until it gets its own regulatory | 1209 * ignore regulatory domain settings until it gets its own regulatory |
1210 *» domain via its regulatory_hint(). After its gets its own regulatory | 1210 *» domain via its regulatory_hint() unless the regulatory hint is |
1211 *» domain it will only allow further regulatory domain settings to | 1211 *» from a country IE. After its gets its own regulatory domain it will |
1212 *» further enhance compliance. For example if channel 13 and 14 are | 1212 *» only allow further regulatory domain settings to further enhance |
1213 *» disabled by this regulatory domain no user regulatory domain can | 1213 *» compliance. For example if channel 13 and 14 are disabled by this |
1214 *» enable these channels at a later time. This can be used for devices | 1214 *» regulatory domain no user regulatory domain can enable these channels |
1215 *» which do not have calibration information gauranteed for frequencies | 1215 *» at a later time. This can be used for devices which do not have |
1216 *» or settings outside of its regulatory domain. | 1216 *» calibration information gauranteed for frequencies or settings |
| 1217 *» outside of its regulatory domain. |
1217 * @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure | 1218 * @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure |
1218 * that passive scan flags and beaconing flags may not be lifted by | 1219 * that passive scan flags and beaconing flags may not be lifted by |
1219 * cfg80211 due to regulatory beacon hints. For more information on beacon | 1220 * cfg80211 due to regulatory beacon hints. For more information on beacon |
1220 * hints read the documenation for regulatory_hint_found_beacon() | 1221 * hints read the documenation for regulatory_hint_found_beacon() |
1221 * @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this | 1222 * @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this |
1222 * wiphy at all | 1223 * wiphy at all |
1223 * @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled | 1224 * @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled |
1224 * by default -- this flag will be set depending on the kernel's default | 1225 * by default -- this flag will be set depending on the kernel's default |
1225 * on wiphy_new(), but can be changed by the driver if it has a good | 1226 * on wiphy_new(), but can be changed by the driver if it has a good |
1226 * reason to override the default | 1227 * reason to override the default |
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2419 * @rssi_event: the triggered RSSI event | 2420 * @rssi_event: the triggered RSSI event |
2420 * @gfp: context flags | 2421 * @gfp: context flags |
2421 * | 2422 * |
2422 * This function is called when a configured connection quality monitoring | 2423 * This function is called when a configured connection quality monitoring |
2423 * rssi threshold reached event occurs. | 2424 * rssi threshold reached event occurs. |
2424 */ | 2425 */ |
2425 void cfg80211_cqm_rssi_notify(struct net_device *dev, | 2426 void cfg80211_cqm_rssi_notify(struct net_device *dev, |
2426 enum nl80211_cqm_rssi_threshold_event rssi_event, | 2427 enum nl80211_cqm_rssi_threshold_event rssi_event, |
2427 gfp_t gfp); | 2428 gfp_t gfp); |
2428 | 2429 |
| 2430 #ifdef __KERNEL__ |
| 2431 |
2429 /** | 2432 /** |
2430 * cfg80211_cqm_bitrate_notify - connection quality monitoring bitrate event | 2433 * cfg80211_cqm_bitrate_notify - connection quality monitoring bitrate event |
2431 * @dev: network device | 2434 * @dev: network device |
2432 * @rate: the new transmit rate | 2435 * @rate: the new transmit rate |
2433 * @gfp: context flags | 2436 * @gfp: context flags |
2434 * | 2437 * |
2435 * This function is called when a the transmit bitrate changes, and | 2438 * This function is called when a the transmit bitrate changes, and |
2436 * connection quality monitoring is configured to capture these events. | 2439 * connection quality monitoring is configured to capture these events. |
2437 */ | 2440 */ |
2438 void cfg80211_cqm_bitrate_notify(struct net_device *dev, | 2441 void cfg80211_cqm_bitrate_notify(struct net_device *dev, |
2439 u32 bitrate, | 2442 u32 bitrate, |
2440 gfp_t gfp); | 2443 gfp_t gfp); |
2441 | 2444 |
2442 #ifdef __KERNEL__ | |
2443 | |
2444 /* Logging, debugging and troubleshooting/diagnostic helpers. */ | 2445 /* Logging, debugging and troubleshooting/diagnostic helpers. */ |
2445 | 2446 |
2446 /* wiphy_printk helpers, similar to dev_printk */ | 2447 /* wiphy_printk helpers, similar to dev_printk */ |
2447 | 2448 |
2448 #define wiphy_printk(level, wiphy, format, args...) \ | 2449 #define wiphy_printk(level, wiphy, format, args...) \ |
2449 printk(level "%s: " format, wiphy_name(wiphy), ##args) | 2450 printk(level "%s: " format, wiphy_name(wiphy), ##args) |
2450 #define wiphy_emerg(wiphy, format, args...) \ | 2451 #define wiphy_emerg(wiphy, format, args...) \ |
2451 wiphy_printk(KERN_EMERG, wiphy, format, ##args) | 2452 wiphy_printk(KERN_EMERG, wiphy, format, ##args) |
2452 #define wiphy_alert(wiphy, format, args...) \ | 2453 #define wiphy_alert(wiphy, format, args...) \ |
2453 wiphy_printk(KERN_ALERT, wiphy, format, ##args) | 2454 wiphy_printk(KERN_ALERT, wiphy, format, ##args) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2496 * wiphy_WARN() acts like wiphy_printk(), but with the key difference | 2497 * wiphy_WARN() acts like wiphy_printk(), but with the key difference |
2497 * of using a WARN/WARN_ON to get the message out, including the | 2498 * of using a WARN/WARN_ON to get the message out, including the |
2498 * file/line information and a backtrace. | 2499 * file/line information and a backtrace. |
2499 */ | 2500 */ |
2500 #define wiphy_WARN(wiphy, format, args...) \ | 2501 #define wiphy_WARN(wiphy, format, args...) \ |
2501 WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args); | 2502 WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args); |
2502 | 2503 |
2503 #endif | 2504 #endif |
2504 | 2505 |
2505 #endif /* __NET_CFG80211_H */ | 2506 #endif /* __NET_CFG80211_H */ |
OLD | NEW |