aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-02-10 15:25:55 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 13:45:49 -0500
commit2a5193119269062608582418deba7af82844159a (patch)
tree1f2fe8cffbeb7530dce7fa708310f6fb29ab0dd8 /include/linux
parent849b7967818995a32c3017542e33eb3155944368 (diff)
cfg80211/nl80211: scanning (and mac80211 update to use it)
This patch adds basic scan capability to cfg80211/nl80211 and changes mac80211 to use it. The BSS list that cfg80211 maintains is made driver-accessible with a private area in each BSS struct, but mac80211 doesn't yet use it. That's another large project. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nl80211.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 4bc27049f4e5..8802d1bda382 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -143,6 +143,13 @@
143 * added to all specified management frames generated by 143 * added to all specified management frames generated by
144 * kernel/firmware/driver. 144 * kernel/firmware/driver.
145 * 145 *
146 * @NL80211_CMD_GET_SCAN: get scan results
147 * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
148 * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
149 * NL80211_CMD_GET_SCAN and on the "scan" multicast group)
150 * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
151 * partial scan results may be available
152 *
146 * @NL80211_CMD_MAX: highest used command number 153 * @NL80211_CMD_MAX: highest used command number
147 * @__NL80211_CMD_AFTER_LAST: internal use 154 * @__NL80211_CMD_AFTER_LAST: internal use
148 */ 155 */
@@ -192,6 +199,11 @@ enum nl80211_commands {
192 199
193 NL80211_CMD_GET_REG, 200 NL80211_CMD_GET_REG,
194 201
202 NL80211_CMD_GET_SCAN,
203 NL80211_CMD_TRIGGER_SCAN,
204 NL80211_CMD_NEW_SCAN_RESULTS,
205 NL80211_CMD_SCAN_ABORTED,
206
195 /* add new commands above here */ 207 /* add new commands above here */
196 208
197 /* used to define NL80211_CMD_MAX below */ 209 /* used to define NL80211_CMD_MAX below */
@@ -305,6 +317,18 @@ enum nl80211_commands {
305 * @NL80211_ATTR_IE: Information element(s) data (used, e.g., with 317 * @NL80211_ATTR_IE: Information element(s) data (used, e.g., with
306 * %NL80211_CMD_SET_MGMT_EXTRA_IE). 318 * %NL80211_CMD_SET_MGMT_EXTRA_IE).
307 * 319 *
320 * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with
321 * a single scan request, a wiphy attribute.
322 *
323 * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz)
324 * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive
325 * scanning and include a zero-length SSID (wildcard) for wildcard scan
326 * @NL80211_ATTR_SCAN_GENERATION: the scan generation increases whenever the
327 * scan result list changes (BSS expired or added) so that applications
328 * can verify that they got a single, consistent snapshot (when all dump
329 * messages carried the same generation number)
330 * @NL80211_ATTR_BSS: scan result BSS
331 *
308 * @NL80211_ATTR_MAX: highest attribute number currently defined 332 * @NL80211_ATTR_MAX: highest attribute number currently defined
309 * @__NL80211_ATTR_AFTER_LAST: internal use 333 * @__NL80211_ATTR_AFTER_LAST: internal use
310 */ 334 */
@@ -372,6 +396,13 @@ enum nl80211_attrs {
372 NL80211_ATTR_MGMT_SUBTYPE, 396 NL80211_ATTR_MGMT_SUBTYPE,
373 NL80211_ATTR_IE, 397 NL80211_ATTR_IE,
374 398
399 NL80211_ATTR_MAX_NUM_SCAN_SSIDS,
400
401 NL80211_ATTR_SCAN_FREQUENCIES,
402 NL80211_ATTR_SCAN_SSIDS,
403 NL80211_ATTR_SCAN_GENERATION,
404 NL80211_ATTR_BSS,
405
375 /* add attributes here, update the policy in nl80211.c */ 406 /* add attributes here, update the policy in nl80211.c */
376 407
377 __NL80211_ATTR_AFTER_LAST, 408 __NL80211_ATTR_AFTER_LAST,
@@ -841,4 +872,38 @@ enum nl80211_channel_type {
841 NL80211_CHAN_HT40MINUS, 872 NL80211_CHAN_HT40MINUS,
842 NL80211_CHAN_HT40PLUS 873 NL80211_CHAN_HT40PLUS
843}; 874};
875
876/**
877 * enum nl80211_bss - netlink attributes for a BSS
878 *
879 * @__NL80211_BSS_INVALID: invalid
880 * @NL80211_BSS_FREQUENCY: frequency in MHz (u32)
881 * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64)
882 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16)
883 * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16)
884 * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the
885 * raw information elements from the probe response/beacon (bin)
886 * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon
887 * in mBm (100 * dBm) (s32)
888 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon
889 * in unspecified units, scaled to 0..100 (u8)
890 * @__NL80211_BSS_AFTER_LAST: internal
891 * @NL80211_BSS_MAX: highest BSS attribute
892 */
893enum nl80211_bss {
894 __NL80211_BSS_INVALID,
895 NL80211_BSS_BSSID,
896 NL80211_BSS_FREQUENCY,
897 NL80211_BSS_TSF,
898 NL80211_BSS_BEACON_INTERVAL,
899 NL80211_BSS_CAPABILITY,
900 NL80211_BSS_INFORMATION_ELEMENTS,
901 NL80211_BSS_SIGNAL_MBM,
902 NL80211_BSS_SIGNAL_UNSPEC,
903
904 /* keep last */
905 __NL80211_BSS_AFTER_LAST,
906 NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1
907};
908
844#endif /* __LINUX_NL80211_H */ 909#endif /* __LINUX_NL80211_H */