1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct wireless_dev</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The 802.11 subsystems &#8211; for kernel developers"><link rel="up" href="bk01ch01.html" title="Chapter&#160;1.&#160;Device registration"><link rel="prev" href="API-struct-wiphy.html" title="struct wiphy"><link rel="next" href="API-wiphy-new.html" title="wiphy_new"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct wireless_dev</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-wiphy.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;1.&#160;Device registration</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-wiphy-new.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-wireless-dev"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct wireless_dev &#8212; 
2  wireless device state
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct wireless_dev {
5  struct wiphy * wiphy;
6  enum nl80211_iftype iftype;
7  struct list_head list;
8  struct net_device * netdev;
9  u32 identifier;
10  struct list_head mgmt_registrations;
11  spinlock_t mgmt_registrations_lock;
12  struct mutex mtx;
13  bool use_4addr;
14  bool p2p_started;
15  u8 address[ETH_ALEN];
16  u8 ssid[IEEE80211_MAX_SSID_LEN];
17  u8 ssid_len;
18  u8 mesh_id_len;
19  u8 mesh_id_up_len;
20  struct cfg80211_conn * conn;
21  struct cfg80211_cached_keys * connect_keys;
22  struct list_head event_list;
23  spinlock_t event_lock;
24  struct cfg80211_internal_bss * current_bss;
25  struct cfg80211_chan_def preset_chandef;
26  struct cfg80211_chan_def chandef;
27  bool ibss_fixed;
28  bool ibss_dfs_possible;
29  bool ps;
30  int ps_timeout;
31  int beacon_interval;
32  u32 ap_unexpected_nlportid;
33  bool cac_started;
34  unsigned long cac_start_time;
35  unsigned int cac_time_ms;
36  u32 owner_nlportid;
37#ifdef CONFIG_CFG80211_WEXT
38  struct wext;
39#endif
40};  </pre></div><div class="refsect1"><a name="idp1112227276"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">wiphy</span></dt><dd><p>
41pointer to hardware description
42      </p></dd><dt><span class="term">iftype</span></dt><dd><p>
43interface type
44      </p></dd><dt><span class="term">list</span></dt><dd><p>
45(private) Used to collect the interfaces
46      </p></dd><dt><span class="term">netdev</span></dt><dd><p>
47(private) Used to reference back to the netdev, may be <code class="constant">NULL</code>
48      </p></dd><dt><span class="term">identifier</span></dt><dd><p>
49(private) Identifier used in nl80211 to identify this
50wireless device if it has no netdev
51      </p></dd><dt><span class="term">mgmt_registrations</span></dt><dd><p>
52list of registrations for management frames
53      </p></dd><dt><span class="term">mgmt_registrations_lock</span></dt><dd><p>
54lock for the list
55      </p></dd><dt><span class="term">mtx</span></dt><dd><p>
56mutex used to lock data in this struct, may be used by drivers
57and some API functions require it held
58      </p></dd><dt><span class="term">use_4addr</span></dt><dd><p>
59indicates 4addr mode is used on this interface, must be
60set by driver (if supported) on add_interface BEFORE registering the
61netdev and may otherwise be used by driver read-only, will be update
62by cfg80211 on change_interface
63      </p></dd><dt><span class="term">p2p_started</span></dt><dd><p>
64true if this is a P2P Device that has been started
65      </p></dd><dt><span class="term">address[ETH_ALEN]</span></dt><dd><p>
66The address for this device, valid only if <em class="parameter"><code>netdev</code></em> is <code class="constant">NULL</code>
67      </p></dd><dt><span class="term">ssid[IEEE80211_MAX_SSID_LEN]</span></dt><dd><p>
68(private) Used by the internal configuration code
69      </p></dd><dt><span class="term">ssid_len</span></dt><dd><p>
70(private) Used by the internal configuration code
71      </p></dd><dt><span class="term">mesh_id_len</span></dt><dd><p>
72(private) Used by the internal configuration code
73      </p></dd><dt><span class="term">mesh_id_up_len</span></dt><dd><p>
74(private) Used by the internal configuration code
75      </p></dd><dt><span class="term">conn</span></dt><dd><p>
76(private) cfg80211 software SME connection state machine data
77      </p></dd><dt><span class="term">connect_keys</span></dt><dd><p>
78(private) keys to set after connection is established
79      </p></dd><dt><span class="term">event_list</span></dt><dd><p>
80(private) list for internal event processing
81      </p></dd><dt><span class="term">event_lock</span></dt><dd><p>
82(private) lock for event list
83      </p></dd><dt><span class="term">current_bss</span></dt><dd><p>
84(private) Used by the internal configuration code
85      </p></dd><dt><span class="term">preset_chandef</span></dt><dd><p>
86(private) Used by the internal configuration code to
87track the channel to be used for AP later
88      </p></dd><dt><span class="term">chandef</span></dt><dd><p>
89(private) Used by the internal configuration code to track
90the user-set channel definition.
91      </p></dd><dt><span class="term">ibss_fixed</span></dt><dd><p>
92(private) IBSS is using fixed BSSID
93      </p></dd><dt><span class="term">ibss_dfs_possible</span></dt><dd><p>
94(private) IBSS may change to a DFS channel
95      </p></dd><dt><span class="term">ps</span></dt><dd><p>
96powersave mode is enabled
97      </p></dd><dt><span class="term">ps_timeout</span></dt><dd><p>
98dynamic powersave timeout
99      </p></dd><dt><span class="term">beacon_interval</span></dt><dd><p>
100beacon interval used on this device for transmitting
101beacons, 0 when not valid
102      </p></dd><dt><span class="term">ap_unexpected_nlportid</span></dt><dd><p>
103(private) netlink port ID of application
104registered for unexpected class 3 frames (AP mode)
105      </p></dd><dt><span class="term">cac_started</span></dt><dd><p>
106true if DFS channel availability check has been started
107      </p></dd><dt><span class="term">cac_start_time</span></dt><dd><p>
108timestamp (jiffies) when the dfs state was entered.
109      </p></dd><dt><span class="term">cac_time_ms</span></dt><dd><p>
110CAC time in ms
111      </p></dd><dt><span class="term">owner_nlportid</span></dt><dd><p>
112(private) owner socket port ID
113      </p></dd><dt><span class="term">wext</span></dt><dd><p>
114(private) Used by the internal wireless extensions compat code
115      </p></dd></dl></div></div><div class="refsect1"><a name="idp1112251964"></a><h2>Description</h2><p>
116   </p><p>
117
118   For netdevs, this structure must be allocated by the driver
119   that uses the ieee80211_ptr field in struct net_device (this
120   is intentional so it can be allocated along with the netdev.)
121   It need not be registered then as netdev registration will
122   be intercepted by cfg80211 to see the new wireless device.
123   </p><p>
124
125   For non-netdev uses, it must also be allocated by the driver
126   in response to the cfg80211 callbacks that require it, as
127   there's no netdev registration in that case it may not be
128   allocated outside of callback operations that return it.
129</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-wiphy.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="bk01ch01.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-wiphy-new.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct wiphy</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">wiphy_new</span></td></tr></table></div></body></html>
130