diff options
Diffstat (limited to 'include/net/ieee80211softmac.h')
-rw-r--r-- | include/net/ieee80211softmac.h | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h index 425b3a57ac74..89119277553d 100644 --- a/include/net/ieee80211softmac.h +++ b/include/net/ieee80211softmac.h | |||
@@ -63,13 +63,11 @@ struct ieee80211softmac_wpa { | |||
63 | 63 | ||
64 | /* | 64 | /* |
65 | * Information about association | 65 | * Information about association |
66 | * | ||
67 | * Do we need a lock for this? | ||
68 | * We only ever use this structure inlined | ||
69 | * into our global struct. I've used its lock, | ||
70 | * but maybe we need a local one here? | ||
71 | */ | 66 | */ |
72 | struct ieee80211softmac_assoc_info { | 67 | struct ieee80211softmac_assoc_info { |
68 | |||
69 | struct mutex mutex; | ||
70 | |||
73 | /* | 71 | /* |
74 | * This is the requested ESSID. It is written | 72 | * This is the requested ESSID. It is written |
75 | * only by the WX handlers. | 73 | * only by the WX handlers. |
@@ -99,18 +97,19 @@ struct ieee80211softmac_assoc_info { | |||
99 | * | 97 | * |
100 | * bssfixed is used for SIOCSIWAP. | 98 | * bssfixed is used for SIOCSIWAP. |
101 | */ | 99 | */ |
102 | u8 static_essid:1, | 100 | u8 static_essid; |
103 | short_preamble_available:1, | 101 | u8 short_preamble_available; |
104 | associating:1, | 102 | u8 associating; |
105 | assoc_wait:1, | 103 | u8 associated; |
106 | bssvalid:1, | 104 | u8 assoc_wait; |
107 | bssfixed:1; | 105 | u8 bssvalid; |
106 | u8 bssfixed; | ||
108 | 107 | ||
109 | /* Scan retries remaining */ | 108 | /* Scan retries remaining */ |
110 | int scan_retry; | 109 | int scan_retry; |
111 | 110 | ||
112 | struct work_struct work; | 111 | struct delayed_work work; |
113 | struct work_struct timeout; | 112 | struct delayed_work timeout; |
114 | }; | 113 | }; |
115 | 114 | ||
116 | struct ieee80211softmac_bss_info { | 115 | struct ieee80211softmac_bss_info { |
@@ -229,12 +228,10 @@ struct ieee80211softmac_device { | |||
229 | /* private stuff follows */ | 228 | /* private stuff follows */ |
230 | /* this lock protects this structure */ | 229 | /* this lock protects this structure */ |
231 | spinlock_t lock; | 230 | spinlock_t lock; |
232 | 231 | ||
233 | /* couple of flags */ | 232 | u8 running; /* SoftMAC started? */ |
234 | u8 scanning:1, /* protects scanning from being done multiple times at once */ | 233 | u8 scanning; |
235 | associated:1, | 234 | |
236 | running:1; | ||
237 | |||
238 | struct ieee80211softmac_scaninfo *scaninfo; | 235 | struct ieee80211softmac_scaninfo *scaninfo; |
239 | struct ieee80211softmac_assoc_info associnfo; | 236 | struct ieee80211softmac_assoc_info associnfo; |
240 | struct ieee80211softmac_bss_info bssinfo; | 237 | struct ieee80211softmac_bss_info bssinfo; |
@@ -250,7 +247,7 @@ struct ieee80211softmac_device { | |||
250 | 247 | ||
251 | /* we need to keep a list of network structs we copied */ | 248 | /* we need to keep a list of network structs we copied */ |
252 | struct list_head network_list; | 249 | struct list_head network_list; |
253 | 250 | ||
254 | /* This must be the last item so that it points to the data | 251 | /* This must be the last item so that it points to the data |
255 | * allocated beyond this structure by alloc_ieee80211 */ | 252 | * allocated beyond this structure by alloc_ieee80211 */ |
256 | u8 priv[0]; | 253 | u8 priv[0]; |
@@ -295,7 +292,7 @@ static inline u8 ieee80211softmac_suggest_txrate(struct ieee80211softmac_device | |||
295 | { | 292 | { |
296 | struct ieee80211softmac_txrates *txrates = &mac->txrates; | 293 | struct ieee80211softmac_txrates *txrates = &mac->txrates; |
297 | 294 | ||
298 | if (!mac->associated) | 295 | if (!mac->associnfo.associated) |
299 | return txrates->mgt_mcast_rate; | 296 | return txrates->mgt_mcast_rate; |
300 | 297 | ||
301 | /* We are associated, sending unicast frame */ | 298 | /* We are associated, sending unicast frame */ |