| 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 » dev_printk(level, &(wiphy)->dev, format, ##args) |
| 2450 #define wiphy_emerg(wiphy, format, args...) \ | 2451 #define wiphy_emerg(wiphy, format, args...) \ |
| 2451 » wiphy_printk(KERN_EMERG, wiphy, format, ##args) | 2452 » dev_emerg(&(wiphy)->dev, 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 » dev_alert(&(wiphy)->dev, format, ##args) |
| 2454 #define wiphy_crit(wiphy, format, args...) \ | 2455 #define wiphy_crit(wiphy, format, args...) \ |
| 2455 » wiphy_printk(KERN_CRIT, wiphy, format, ##args) | 2456 » dev_crit(&(wiphy)->dev, format, ##args) |
| 2456 #define wiphy_err(wiphy, format, args...) \ | 2457 #define wiphy_err(wiphy, format, args...) \ |
| 2457 » wiphy_printk(KERN_ERR, wiphy, format, ##args) | 2458 » dev_err(&(wiphy)->dev, format, ##args) |
| 2458 #define wiphy_warn(wiphy, format, args...) \ | 2459 #define wiphy_warn(wiphy, format, args...) \ |
| 2459 » wiphy_printk(KERN_WARNING, wiphy, format, ##args) | 2460 » dev_warn(&(wiphy)->dev, format, ##args) |
| 2460 #define wiphy_notice(wiphy, format, args...) \ | 2461 #define wiphy_notice(wiphy, format, args...) \ |
| 2461 » wiphy_printk(KERN_NOTICE, wiphy, format, ##args) | 2462 » dev_notice(&(wiphy)->dev, format, ##args) |
| 2462 #define wiphy_info(wiphy, format, args...) \ | 2463 #define wiphy_info(wiphy, format, args...) \ |
| 2463 » wiphy_printk(KERN_INFO, wiphy, format, ##args) | 2464 » dev_info(&(wiphy)->dev, format, ##args) |
| 2464 | 2465 |
| 2465 int wiphy_debug(const struct wiphy *wiphy, const char *format, ...) | 2466 #define wiphy_debug(wiphy, format, args...)» » » \ |
| 2466 » __attribute__ ((format (printf, 2, 3))); | 2467 » wiphy_printk(KERN_DEBUG, wiphy, format, ##args) |
| 2467 | 2468 |
| 2468 #if defined(DEBUG) | |
| 2469 #define wiphy_dbg(wiphy, format, args...) \ | 2469 #define wiphy_dbg(wiphy, format, args...) \ |
| 2470 » wiphy_printk(KERN_DEBUG, wiphy, format, ##args) | 2470 » dev_dbg(&(wiphy)->dev, format, ##args) |
| 2471 #elif defined(CONFIG_DYNAMIC_DEBUG) | 2471 |
| 2472 #define wiphy_dbg(wiphy, format, args...)» » » \ | 2472 #if defined(VERBOSE_DEBUG) |
| 2473 » dynamic_pr_debug("%s: " format,»wiphy_name(wiphy), ##args) | 2473 #define wiphy_vdbg» wiphy_dbg |
| 2474 #else | 2474 #else |
| 2475 #define wiphy_dbg(wiphy, format, args...)» » » » \ | 2475 #define wiphy_vdbg(wiphy, format, args...)» » » » \ |
| 2476 ({ \ | 2476 ({ \ |
| 2477 if (0) \ | 2477 if (0) \ |
| 2478 wiphy_printk(KERN_DEBUG, wiphy, format, ##args); \ | 2478 wiphy_printk(KERN_DEBUG, wiphy, format, ##args); \ |
| 2479 0; \ | 2479 0; \ |
| 2480 }) | 2480 }) |
| 2481 #endif | 2481 #endif |
| 2482 | 2482 |
| 2483 #if defined(VERBOSE_DEBUG) | |
| 2484 #define wiphy_vdbg wiphy_dbg | |
| 2485 #else | |
| 2486 | |
| 2487 #define wiphy_vdbg(wiphy, format, args...) \ | |
| 2488 ({ \ | |
| 2489 if (0) \ | |
| 2490 wiphy_printk(KERN_DEBUG, wiphy, format, ##args); \ | |
| 2491 0; \ | |
| 2492 }) | |
| 2493 #endif | |
| 2494 | |
| 2495 /* | 2483 /* |
| 2496 * wiphy_WARN() acts like wiphy_printk(), but with the key difference | 2484 * 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 | 2485 * of using a WARN/WARN_ON to get the message out, including the |
| 2498 * file/line information and a backtrace. | 2486 * file/line information and a backtrace. |
| 2499 */ | 2487 */ |
| 2500 #define wiphy_WARN(wiphy, format, args...) \ | 2488 #define wiphy_WARN(wiphy, format, args...) \ |
| 2501 WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args); | 2489 WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args); |
| 2502 | 2490 |
| 2503 #endif | 2491 #endif |
| 2504 | 2492 |
| 2505 #endif /* __NET_CFG80211_H */ | 2493 #endif /* __NET_CFG80211_H */ |
| OLD | NEW |