Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: chromeos/compat-wireless/net/wireless/mlme.c

Issue 5326002: Update compat-wireless to 2.6.36-5-spn (Closed) Base URL: http://git.chromium.org/git/kernel.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * cfg80211 MLME SAP interface 2 * cfg80211 MLME SAP interface
3 * 3 *
4 * Copyright (c) 2009, Jouni Malinen <j@w1.fi> 4 * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
5 */ 5 */
6 6
7 #include <linux/kernel.h> 7 #include <linux/kernel.h>
8 #include <linux/module.h> 8 #include <linux/module.h>
9 #include <linux/netdevice.h> 9 #include <linux/netdevice.h>
10 #include <linux/nl80211.h> 10 #include <linux/nl80211.h>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 void __cfg80211_send_deauth(struct net_device *dev, 143 void __cfg80211_send_deauth(struct net_device *dev,
144 const u8 *buf, size_t len) 144 const u8 *buf, size_t len)
145 { 145 {
146 struct wireless_dev *wdev = dev->ieee80211_ptr; 146 struct wireless_dev *wdev = dev->ieee80211_ptr;
147 struct wiphy *wiphy = wdev->wiphy; 147 struct wiphy *wiphy = wdev->wiphy;
148 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 148 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
149 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; 149 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf;
150 const u8 *bssid = mgmt->bssid; 150 const u8 *bssid = mgmt->bssid;
151 int i; 151 int i;
152 » bool found = false, was_current = false; 152 » bool found = false;
153 153
154 ASSERT_WDEV_LOCK(wdev); 154 ASSERT_WDEV_LOCK(wdev);
155 155
156 if (wdev->current_bss && 156 if (wdev->current_bss &&
157 memcmp(wdev->current_bss->pub.bssid, bssid, ETH_ALEN) == 0) { 157 memcmp(wdev->current_bss->pub.bssid, bssid, ETH_ALEN) == 0) {
158 cfg80211_unhold_bss(wdev->current_bss); 158 cfg80211_unhold_bss(wdev->current_bss);
159 cfg80211_put_bss(&wdev->current_bss->pub); 159 cfg80211_put_bss(&wdev->current_bss->pub);
160 wdev->current_bss = NULL; 160 wdev->current_bss = NULL;
161 found = true; 161 found = true;
162 was_current = true;
163 } else for (i = 0; i < MAX_AUTH_BSSES; i++) { 162 } else for (i = 0; i < MAX_AUTH_BSSES; i++) {
164 if (wdev->auth_bsses[i] && 163 if (wdev->auth_bsses[i] &&
165 memcmp(wdev->auth_bsses[i]->pub.bssid, bssid, ETH_ALEN) == 0 ) { 164 memcmp(wdev->auth_bsses[i]->pub.bssid, bssid, ETH_ALEN) == 0 ) {
166 cfg80211_unhold_bss(wdev->auth_bsses[i]); 165 cfg80211_unhold_bss(wdev->auth_bsses[i]);
167 cfg80211_put_bss(&wdev->auth_bsses[i]->pub); 166 cfg80211_put_bss(&wdev->auth_bsses[i]->pub);
168 wdev->auth_bsses[i] = NULL; 167 wdev->auth_bsses[i] = NULL;
169 found = true; 168 found = true;
170 break; 169 break;
171 } 170 }
172 if (wdev->authtry_bsses[i] && 171 if (wdev->authtry_bsses[i] &&
173 memcmp(wdev->authtry_bsses[i]->pub.bssid, bssid, ETH_ALEN) = = 0) { 172 memcmp(wdev->authtry_bsses[i]->pub.bssid, bssid, ETH_ALEN) = = 0) {
174 cfg80211_unhold_bss(wdev->authtry_bsses[i]); 173 cfg80211_unhold_bss(wdev->authtry_bsses[i]);
175 cfg80211_put_bss(&wdev->authtry_bsses[i]->pub); 174 cfg80211_put_bss(&wdev->authtry_bsses[i]->pub);
176 wdev->authtry_bsses[i] = NULL; 175 wdev->authtry_bsses[i] = NULL;
177 found = true; 176 found = true;
178 break; 177 break;
179 } 178 }
180 } 179 }
181 180
182 if (!found) 181 if (!found)
183 return; 182 return;
184 183
185 nl80211_send_deauth(rdev, dev, buf, len, GFP_KERNEL); 184 nl80211_send_deauth(rdev, dev, buf, len, GFP_KERNEL);
186 185
187 » if (wdev->sme_state == CFG80211_SME_CONNECTED && was_current) { 186 » if (wdev->sme_state == CFG80211_SME_CONNECTED) {
Sam Leffler 2010/12/01 00:23:44 not sure about these changes
188 u16 reason_code; 187 u16 reason_code;
189 bool from_ap; 188 bool from_ap;
190 189
191 reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); 190 reason_code = le16_to_cpu(mgmt->u.deauth.reason_code);
192 191
193 from_ap = memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) != 0; 192 from_ap = memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) != 0;
194 __cfg80211_disconnected(dev, NULL, 0, reason_code, from_ap); 193 __cfg80211_disconnected(dev, NULL, 0, reason_code, from_ap);
195 } else if (wdev->sme_state == CFG80211_SME_CONNECTING) { 194 } else if (wdev->sme_state == CFG80211_SME_CONNECTING) {
196 __cfg80211_connect_result(dev, mgmt->bssid, NULL, 0, NULL, 0, 195 __cfg80211_connect_result(dev, mgmt->bssid, NULL, 0, NULL, 0,
197 WLAN_STATUS_UNSPECIFIED_FAILURE, 196 WLAN_STATUS_UNSPECIFIED_FAILURE,
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 gfp_t gfp) 939 gfp_t gfp)
941 { 940 {
942 struct wireless_dev *wdev = dev->ieee80211_ptr; 941 struct wireless_dev *wdev = dev->ieee80211_ptr;
943 struct wiphy *wiphy = wdev->wiphy; 942 struct wiphy *wiphy = wdev->wiphy;
944 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 943 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
945 944
946 /* Indicate roaming trigger event to user space */ 945 /* Indicate roaming trigger event to user space */
947 nl80211_send_cqm_bitrate_notify(rdev, dev, bitrate, gfp); 946 nl80211_send_cqm_bitrate_notify(rdev, dev, bitrate, gfp);
948 } 947 }
949 EXPORT_SYMBOL(cfg80211_cqm_bitrate_notify); 948 EXPORT_SYMBOL(cfg80211_cqm_bitrate_notify);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698