Chapter 3. Scanning and BSS list handling

Table of Contents

struct cfg80211_ssid — SSID description
struct cfg80211_scan_request — scan request description
cfg80211_scan_done — notify that scan finished
struct cfg80211_bss — BSS description
cfg80211_inform_bss_frame — inform cfg80211 of a received BSS frame
cfg80211_inform_bss — inform cfg80211 of a new BSS
cfg80211_unlink_bss — unlink BSS from internal data structures
cfg80211_find_ie — find information element in data
ieee80211_bss_get_ie — find IE with given ID

The scanning process itself is fairly simple, but cfg80211 offers quite a bit of helper functionality. To start a scan, the scan operation will be invoked with a scan definition. This scan definition contains the channels to scan, and the SSIDs to send probe requests for (including the wildcard, if desired). A passive scan is indicated by having no SSIDs to probe. Additionally, a scan request may contain extra information elements that should be added to the probe request. The IEs are guaranteed to be well-formed, and will not exceed the maximum length the driver advertised in the wiphy structure.

When scanning finds a BSS, cfg80211 needs to be notified of that, because it is responsible for maintaining the BSS list; the driver should not maintain a list itself. For this notification, various functions exist.

Since drivers do not maintain a BSS list, there are also a number of functions to search for a BSS and obtain information about it from the BSS structure cfg80211 maintains. The BSS list is also made available to userspace.