aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/join.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/join.c')
-rw-r--r--drivers/net/wireless/libertas/join.c130
1 files changed, 65 insertions, 65 deletions
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c
index dc24a05c9447..90c25f478123 100644
--- a/drivers/net/wireless/libertas/join.c
+++ b/drivers/net/wireless/libertas/join.c
@@ -30,16 +30,16 @@
30 * NOTE: Setting the MSB of the basic rates need to be taken 30 * NOTE: Setting the MSB of the basic rates need to be taken
31 * care, either before or after calling this function 31 * care, either before or after calling this function
32 * 32 *
33 * @param adapter A pointer to wlan_adapter structure 33 * @param adapter A pointer to lbs_adapter structure
34 * @param rate1 the buffer which keeps input and output 34 * @param rate1 the buffer which keeps input and output
35 * @param rate1_size the size of rate1 buffer; new size of buffer on return 35 * @param rate1_size the size of rate1 buffer; new size of buffer on return
36 * 36 *
37 * @return 0 or -1 37 * @return 0 or -1
38 */ 38 */
39static int get_common_rates(wlan_adapter * adapter, u8 * rates, u16 *rates_size) 39static int get_common_rates(lbs_adapter *adapter, u8 *rates, u16 *rates_size)
40{ 40{
41 u8 *card_rates = libertas_bg_rates; 41 u8 *card_rates = lbs_bg_rates;
42 size_t num_card_rates = sizeof(libertas_bg_rates); 42 size_t num_card_rates = sizeof(lbs_bg_rates);
43 int ret = 0, i, j; 43 int ret = 0, i, j;
44 u8 tmp[30]; 44 u8 tmp[30];
45 size_t tmp_size = 0; 45 size_t tmp_size = 0;
@@ -85,7 +85,7 @@ done:
85 * @param rates buffer of data rates 85 * @param rates buffer of data rates
86 * @param len size of buffer 86 * @param len size of buffer
87 */ 87 */
88static void libertas_set_basic_rate_flags(u8 * rates, size_t len) 88static void lbs_set_basic_rate_flags(u8 *rates, size_t len)
89{ 89{
90 int i; 90 int i;
91 91
@@ -104,7 +104,7 @@ static void libertas_set_basic_rate_flags(u8 * rates, size_t len)
104 * @param rates buffer of data rates 104 * @param rates buffer of data rates
105 * @param len size of buffer 105 * @param len size of buffer
106 */ 106 */
107void libertas_unset_basic_rate_flags(u8 * rates, size_t len) 107void lbs_unset_basic_rate_flags(u8 *rates, size_t len)
108{ 108{
109 int i; 109 int i;
110 110
@@ -116,19 +116,19 @@ void libertas_unset_basic_rate_flags(u8 * rates, size_t len)
116/** 116/**
117 * @brief Associate to a specific BSS discovered in a scan 117 * @brief Associate to a specific BSS discovered in a scan
118 * 118 *
119 * @param priv A pointer to wlan_private structure 119 * @param priv A pointer to lbs_private structure
120 * @param pbssdesc Pointer to the BSS descriptor to associate with. 120 * @param pbssdesc Pointer to the BSS descriptor to associate with.
121 * 121 *
122 * @return 0-success, otherwise fail 122 * @return 0-success, otherwise fail
123 */ 123 */
124int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req) 124int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req)
125{ 125{
126 wlan_adapter *adapter = priv->adapter; 126 lbs_adapter *adapter = priv->adapter;
127 int ret; 127 int ret;
128 128
129 lbs_deb_enter(LBS_DEB_JOIN); 129 lbs_deb_enter(LBS_DEB_JOIN);
130 130
131 ret = libertas_prepare_and_send_command(priv, CMD_802_11_AUTHENTICATE, 131 ret = lbs_prepare_and_send_command(priv, CMD_802_11_AUTHENTICATE,
132 0, CMD_OPTION_WAITFORRSP, 132 0, CMD_OPTION_WAITFORRSP,
133 0, assoc_req->bss.bssid); 133 0, assoc_req->bss.bssid);
134 134
@@ -142,9 +142,9 @@ int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req)
142 else 142 else
143 adapter->preamble = CMD_TYPE_LONG_PREAMBLE; 143 adapter->preamble = CMD_TYPE_LONG_PREAMBLE;
144 144
145 libertas_set_radio_control(priv); 145 lbs_set_radio_control(priv);
146 146
147 ret = libertas_prepare_and_send_command(priv, CMD_802_11_ASSOCIATE, 147 ret = lbs_prepare_and_send_command(priv, CMD_802_11_ASSOCIATE,
148 0, CMD_OPTION_WAITFORRSP, 0, assoc_req); 148 0, CMD_OPTION_WAITFORRSP, 0, assoc_req);
149 149
150done: 150done:
@@ -155,13 +155,13 @@ done:
155/** 155/**
156 * @brief Start an Adhoc Network 156 * @brief Start an Adhoc Network
157 * 157 *
158 * @param priv A pointer to wlan_private structure 158 * @param priv A pointer to lbs_private structure
159 * @param adhocssid The ssid of the Adhoc Network 159 * @param adhocssid The ssid of the Adhoc Network
160 * @return 0--success, -1--fail 160 * @return 0--success, -1--fail
161 */ 161 */
162int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * assoc_req) 162int lbs_start_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req)
163{ 163{
164 wlan_adapter *adapter = priv->adapter; 164 lbs_adapter *adapter = priv->adapter;
165 int ret = 0; 165 int ret = 0;
166 166
167 adapter->adhoccreate = 1; 167 adapter->adhoccreate = 1;
@@ -174,12 +174,12 @@ int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * ass
174 adapter->preamble = CMD_TYPE_LONG_PREAMBLE; 174 adapter->preamble = CMD_TYPE_LONG_PREAMBLE;
175 } 175 }
176 176
177 libertas_set_radio_control(priv); 177 lbs_set_radio_control(priv);
178 178
179 lbs_deb_join("AdhocStart: channel = %d\n", assoc_req->channel); 179 lbs_deb_join("AdhocStart: channel = %d\n", assoc_req->channel);
180 lbs_deb_join("AdhocStart: band = %d\n", assoc_req->band); 180 lbs_deb_join("AdhocStart: band = %d\n", assoc_req->band);
181 181
182 ret = libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_START, 182 ret = lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_START,
183 0, CMD_OPTION_WAITFORRSP, 0, assoc_req); 183 0, CMD_OPTION_WAITFORRSP, 0, assoc_req);
184 184
185 return ret; 185 return ret;
@@ -188,15 +188,15 @@ int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * ass
188/** 188/**
189 * @brief Join an adhoc network found in a previous scan 189 * @brief Join an adhoc network found in a previous scan
190 * 190 *
191 * @param priv A pointer to wlan_private structure 191 * @param priv A pointer to lbs_private structure
192 * @param pbssdesc Pointer to a BSS descriptor found in a previous scan 192 * @param pbssdesc Pointer to a BSS descriptor found in a previous scan
193 * to attempt to join 193 * to attempt to join
194 * 194 *
195 * @return 0--success, -1--fail 195 * @return 0--success, -1--fail
196 */ 196 */
197int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * assoc_req) 197int lbs_join_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req)
198{ 198{
199 wlan_adapter *adapter = priv->adapter; 199 lbs_adapter *adapter = priv->adapter;
200 struct bss_descriptor * bss = &assoc_req->bss; 200 struct bss_descriptor * bss = &assoc_req->bss;
201 int ret = 0; 201 int ret = 0;
202 202
@@ -211,11 +211,11 @@ int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * asso
211 211
212 /* check if the requested SSID is already joined */ 212 /* check if the requested SSID is already joined */
213 if ( adapter->curbssparams.ssid_len 213 if ( adapter->curbssparams.ssid_len
214 && !libertas_ssid_cmp(adapter->curbssparams.ssid, 214 && !lbs_ssid_cmp(adapter->curbssparams.ssid,
215 adapter->curbssparams.ssid_len, 215 adapter->curbssparams.ssid_len,
216 bss->ssid, bss->ssid_len) 216 bss->ssid, bss->ssid_len)
217 && (adapter->mode == IW_MODE_ADHOC) 217 && (adapter->mode == IW_MODE_ADHOC)
218 && (adapter->connect_status == LIBERTAS_CONNECTED)) { 218 && (adapter->connect_status == LBS_CONNECTED)) {
219 union iwreq_data wrqu; 219 union iwreq_data wrqu;
220 220
221 lbs_deb_join("ADHOC_J_CMD: New ad-hoc SSID is the same as " 221 lbs_deb_join("ADHOC_J_CMD: New ad-hoc SSID is the same as "
@@ -243,14 +243,14 @@ int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * asso
243 adapter->preamble = CMD_TYPE_SHORT_PREAMBLE; 243 adapter->preamble = CMD_TYPE_SHORT_PREAMBLE;
244 } 244 }
245 245
246 libertas_set_radio_control(priv); 246 lbs_set_radio_control(priv);
247 247
248 lbs_deb_join("AdhocJoin: channel = %d\n", assoc_req->channel); 248 lbs_deb_join("AdhocJoin: channel = %d\n", assoc_req->channel);
249 lbs_deb_join("AdhocJoin: band = %c\n", assoc_req->band); 249 lbs_deb_join("AdhocJoin: band = %c\n", assoc_req->band);
250 250
251 adapter->adhoccreate = 0; 251 adapter->adhoccreate = 0;
252 252
253 ret = libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_JOIN, 253 ret = lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_JOIN,
254 0, CMD_OPTION_WAITFORRSP, 254 0, CMD_OPTION_WAITFORRSP,
255 OID_802_11_SSID, assoc_req); 255 OID_802_11_SSID, assoc_req);
256 256
@@ -258,38 +258,38 @@ out:
258 return ret; 258 return ret;
259} 259}
260 260
261int libertas_stop_adhoc_network(wlan_private * priv) 261int lbs_stop_adhoc_network(lbs_private * priv)
262{ 262{
263 return libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_STOP, 263 return lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_STOP,
264 0, CMD_OPTION_WAITFORRSP, 0, NULL); 264 0, CMD_OPTION_WAITFORRSP, 0, NULL);
265} 265}
266 266
267/** 267/**
268 * @brief Send Deauthentication Request 268 * @brief Send Deauthentication Request
269 * 269 *
270 * @param priv A pointer to wlan_private structure 270 * @param priv A pointer to lbs_private structure
271 * @return 0--success, -1--fail 271 * @return 0--success, -1--fail
272 */ 272 */
273int libertas_send_deauthentication(wlan_private * priv) 273int lbs_send_deauthentication(lbs_private *priv)
274{ 274{
275 return libertas_prepare_and_send_command(priv, CMD_802_11_DEAUTHENTICATE, 275 return lbs_prepare_and_send_command(priv, CMD_802_11_DEAUTHENTICATE,
276 0, CMD_OPTION_WAITFORRSP, 0, NULL); 276 0, CMD_OPTION_WAITFORRSP, 0, NULL);
277} 277}
278 278
279/** 279/**
280 * @brief This function prepares command of authenticate. 280 * @brief This function prepares command of authenticate.
281 * 281 *
282 * @param priv A pointer to wlan_private structure 282 * @param priv A pointer to lbs_private structure
283 * @param cmd A pointer to cmd_ds_command structure 283 * @param cmd A pointer to cmd_ds_command structure
284 * @param pdata_buf Void cast of pointer to a BSSID to authenticate with 284 * @param pdata_buf Void cast of pointer to a BSSID to authenticate with
285 * 285 *
286 * @return 0 or -1 286 * @return 0 or -1
287 */ 287 */
288int libertas_cmd_80211_authenticate(wlan_private * priv, 288int lbs_cmd_80211_authenticate(lbs_private *priv,
289 struct cmd_ds_command *cmd, 289 struct cmd_ds_command *cmd,
290 void *pdata_buf) 290 void *pdata_buf)
291{ 291{
292 wlan_adapter *adapter = priv->adapter; 292 lbs_adapter *adapter = priv->adapter;
293 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth; 293 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
294 int ret = -1; 294 int ret = -1;
295 u8 *bssid = pdata_buf; 295 u8 *bssid = pdata_buf;
@@ -329,10 +329,10 @@ out:
329 return ret; 329 return ret;
330} 330}
331 331
332int libertas_cmd_80211_deauthenticate(wlan_private * priv, 332int lbs_cmd_80211_deauthenticate(lbs_private *priv,
333 struct cmd_ds_command *cmd) 333 struct cmd_ds_command *cmd)
334{ 334{
335 wlan_adapter *adapter = priv->adapter; 335 lbs_adapter *adapter = priv->adapter;
336 struct cmd_ds_802_11_deauthenticate *dauth = &cmd->params.deauth; 336 struct cmd_ds_802_11_deauthenticate *dauth = &cmd->params.deauth;
337 337
338 lbs_deb_enter(LBS_DEB_JOIN); 338 lbs_deb_enter(LBS_DEB_JOIN);
@@ -352,10 +352,10 @@ int libertas_cmd_80211_deauthenticate(wlan_private * priv,
352 return 0; 352 return 0;
353} 353}
354 354
355int libertas_cmd_80211_associate(wlan_private * priv, 355int lbs_cmd_80211_associate(lbs_private *priv,
356 struct cmd_ds_command *cmd, void *pdata_buf) 356 struct cmd_ds_command *cmd, void *pdata_buf)
357{ 357{
358 wlan_adapter *adapter = priv->adapter; 358 lbs_adapter *adapter = priv->adapter;
359 struct cmd_ds_802_11_associate *passo = &cmd->params.associate; 359 struct cmd_ds_802_11_associate *passo = &cmd->params.associate;
360 int ret = 0; 360 int ret = 0;
361 struct assoc_request * assoc_req = pdata_buf; 361 struct assoc_request * assoc_req = pdata_buf;
@@ -431,7 +431,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
431 /* Set MSB on basic rates as the firmware requires, but _after_ 431 /* Set MSB on basic rates as the firmware requires, but _after_
432 * copying to current bss rates. 432 * copying to current bss rates.
433 */ 433 */
434 libertas_set_basic_rate_flags(rates->rates, tmplen); 434 lbs_set_basic_rate_flags(rates->rates, tmplen);
435 435
436 if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) { 436 if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) {
437 rsn = (struct mrvlietypes_rsnparamset *) pos; 437 rsn = (struct mrvlietypes_rsnparamset *) pos;
@@ -448,7 +448,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
448 /* update curbssparams */ 448 /* update curbssparams */
449 adapter->curbssparams.channel = bss->phyparamset.dsparamset.currentchan; 449 adapter->curbssparams.channel = bss->phyparamset.dsparamset.currentchan;
450 450
451 if (libertas_parse_dnld_countryinfo_11d(priv, bss)) { 451 if (lbs_parse_dnld_countryinfo_11d(priv, bss)) {
452 ret = -1; 452 ret = -1;
453 goto done; 453 goto done;
454 } 454 }
@@ -468,10 +468,10 @@ done:
468 return ret; 468 return ret;
469} 469}
470 470
471int libertas_cmd_80211_ad_hoc_start(wlan_private * priv, 471int lbs_cmd_80211_ad_hoc_start(lbs_private *priv,
472 struct cmd_ds_command *cmd, void *pdata_buf) 472 struct cmd_ds_command *cmd, void *pdata_buf)
473{ 473{
474 wlan_adapter *adapter = priv->adapter; 474 lbs_adapter *adapter = priv->adapter;
475 struct cmd_ds_802_11_ad_hoc_start *adhs = &cmd->params.ads; 475 struct cmd_ds_802_11_ad_hoc_start *adhs = &cmd->params.ads;
476 int ret = 0; 476 int ret = 0;
477 int cmdappendsize = 0; 477 int cmdappendsize = 0;
@@ -548,8 +548,8 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
548 adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME); 548 adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME);
549 549
550 memset(adhs->rates, 0, sizeof(adhs->rates)); 550 memset(adhs->rates, 0, sizeof(adhs->rates));
551 ratesize = min(sizeof(adhs->rates), sizeof(libertas_bg_rates)); 551 ratesize = min(sizeof(adhs->rates), sizeof(lbs_bg_rates));
552 memcpy(adhs->rates, libertas_bg_rates, ratesize); 552 memcpy(adhs->rates, lbs_bg_rates, ratesize);
553 553
554 /* Copy the ad-hoc creating rates into Current BSS state structure */ 554 /* Copy the ad-hoc creating rates into Current BSS state structure */
555 memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates)); 555 memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates));
@@ -558,14 +558,14 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
558 /* Set MSB on basic rates as the firmware requires, but _after_ 558 /* Set MSB on basic rates as the firmware requires, but _after_
559 * copying to current bss rates. 559 * copying to current bss rates.
560 */ 560 */
561 libertas_set_basic_rate_flags(adhs->rates, ratesize); 561 lbs_set_basic_rate_flags(adhs->rates, ratesize);
562 562
563 lbs_deb_join("ADHOC_S_CMD: rates=%02x %02x %02x %02x \n", 563 lbs_deb_join("ADHOC_S_CMD: rates=%02x %02x %02x %02x \n",
564 adhs->rates[0], adhs->rates[1], adhs->rates[2], adhs->rates[3]); 564 adhs->rates[0], adhs->rates[1], adhs->rates[2], adhs->rates[3]);
565 565
566 lbs_deb_join("ADHOC_S_CMD: AD HOC Start command is ready\n"); 566 lbs_deb_join("ADHOC_S_CMD: AD HOC Start command is ready\n");
567 567
568 if (libertas_create_dnld_countryinfo_11d(priv)) { 568 if (lbs_create_dnld_countryinfo_11d(priv)) {
569 lbs_deb_join("ADHOC_S_CMD: dnld_countryinfo_11d failed\n"); 569 lbs_deb_join("ADHOC_S_CMD: dnld_countryinfo_11d failed\n");
570 ret = -1; 570 ret = -1;
571 goto done; 571 goto done;
@@ -580,7 +580,7 @@ done:
580 return ret; 580 return ret;
581} 581}
582 582
583int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv, 583int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv,
584 struct cmd_ds_command *cmd) 584 struct cmd_ds_command *cmd)
585{ 585{
586 cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP); 586 cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP);
@@ -589,10 +589,10 @@ int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv,
589 return 0; 589 return 0;
590} 590}
591 591
592int libertas_cmd_80211_ad_hoc_join(wlan_private * priv, 592int lbs_cmd_80211_ad_hoc_join(lbs_private *priv,
593 struct cmd_ds_command *cmd, void *pdata_buf) 593 struct cmd_ds_command *cmd, void *pdata_buf)
594{ 594{
595 wlan_adapter *adapter = priv->adapter; 595 lbs_adapter *adapter = priv->adapter;
596 struct cmd_ds_802_11_ad_hoc_join *join_cmd = &cmd->params.adj; 596 struct cmd_ds_802_11_ad_hoc_join *join_cmd = &cmd->params.adj;
597 struct assoc_request * assoc_req = pdata_buf; 597 struct assoc_request * assoc_req = pdata_buf;
598 struct bss_descriptor *bss = &assoc_req->bss; 598 struct bss_descriptor *bss = &assoc_req->bss;
@@ -652,7 +652,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
652 /* Set MSB on basic rates as the firmware requires, but _after_ 652 /* Set MSB on basic rates as the firmware requires, but _after_
653 * copying to current bss rates. 653 * copying to current bss rates.
654 */ 654 */
655 libertas_set_basic_rate_flags(join_cmd->bss.rates, ratesize); 655 lbs_set_basic_rate_flags(join_cmd->bss.rates, ratesize);
656 656
657 join_cmd->bss.ssparamset.ibssparamset.atimwindow = 657 join_cmd->bss.ssparamset.ibssparamset.atimwindow =
658 cpu_to_le16(bss->atimwindow); 658 cpu_to_le16(bss->atimwindow);
@@ -663,12 +663,12 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
663 join_cmd->bss.capability = cpu_to_le16(tmp); 663 join_cmd->bss.capability = cpu_to_le16(tmp);
664 } 664 }
665 665
666 if (adapter->psmode == WLAN802_11POWERMODEMAX_PSP) { 666 if (adapter->psmode == LBS802_11POWERMODEMAX_PSP) {
667 /* wake up first */ 667 /* wake up first */
668 __le32 Localpsmode; 668 __le32 Localpsmode;
669 669
670 Localpsmode = cpu_to_le32(WLAN802_11POWERMODECAM); 670 Localpsmode = cpu_to_le32(LBS802_11POWERMODECAM);
671 ret = libertas_prepare_and_send_command(priv, 671 ret = lbs_prepare_and_send_command(priv,
672 CMD_802_11_PS_MODE, 672 CMD_802_11_PS_MODE,
673 CMD_ACT_SET, 673 CMD_ACT_SET,
674 0, 0, &Localpsmode); 674 0, 0, &Localpsmode);
@@ -679,7 +679,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
679 } 679 }
680 } 680 }
681 681
682 if (libertas_parse_dnld_countryinfo_11d(priv, bss)) { 682 if (lbs_parse_dnld_countryinfo_11d(priv, bss)) {
683 ret = -1; 683 ret = -1;
684 goto done; 684 goto done;
685 } 685 }
@@ -692,10 +692,10 @@ done:
692 return ret; 692 return ret;
693} 693}
694 694
695int libertas_ret_80211_associate(wlan_private * priv, 695int lbs_ret_80211_associate(lbs_private *priv,
696 struct cmd_ds_command *resp) 696 struct cmd_ds_command *resp)
697{ 697{
698 wlan_adapter *adapter = priv->adapter; 698 lbs_adapter *adapter = priv->adapter;
699 int ret = 0; 699 int ret = 0;
700 union iwreq_data wrqu; 700 union iwreq_data wrqu;
701 struct ieeetypes_assocrsp *passocrsp; 701 struct ieeetypes_assocrsp *passocrsp;
@@ -762,7 +762,7 @@ int libertas_ret_80211_associate(wlan_private * priv,
762 } 762 }
763 763
764 if (status_code) { 764 if (status_code) {
765 libertas_mac_event_disconnected(priv); 765 lbs_mac_event_disconnected(priv);
766 ret = -1; 766 ret = -1;
767 goto done; 767 goto done;
768 } 768 }
@@ -771,7 +771,7 @@ int libertas_ret_80211_associate(wlan_private * priv,
771 le16_to_cpu(resp->size) - S_DS_GEN); 771 le16_to_cpu(resp->size) - S_DS_GEN);
772 772
773 /* Send a Media Connected event, according to the Spec */ 773 /* Send a Media Connected event, according to the Spec */
774 adapter->connect_status = LIBERTAS_CONNECTED; 774 adapter->connect_status = LBS_CONNECTED;
775 775
776 lbs_deb_join("ASSOC_RESP: assocated to '%s'\n", 776 lbs_deb_join("ASSOC_RESP: assocated to '%s'\n",
777 escape_essid(bss->ssid, bss->ssid_len)); 777 escape_essid(bss->ssid, bss->ssid_len));
@@ -809,21 +809,21 @@ done:
809 return ret; 809 return ret;
810} 810}
811 811
812int libertas_ret_80211_disassociate(wlan_private * priv, 812int lbs_ret_80211_disassociate(lbs_private *priv,
813 struct cmd_ds_command *resp) 813 struct cmd_ds_command *resp)
814{ 814{
815 lbs_deb_enter(LBS_DEB_JOIN); 815 lbs_deb_enter(LBS_DEB_JOIN);
816 816
817 libertas_mac_event_disconnected(priv); 817 lbs_mac_event_disconnected(priv);
818 818
819 lbs_deb_leave(LBS_DEB_JOIN); 819 lbs_deb_leave(LBS_DEB_JOIN);
820 return 0; 820 return 0;
821} 821}
822 822
823int libertas_ret_80211_ad_hoc_start(wlan_private * priv, 823int lbs_ret_80211_ad_hoc_start(lbs_private *priv,
824 struct cmd_ds_command *resp) 824 struct cmd_ds_command *resp)
825{ 825{
826 wlan_adapter *adapter = priv->adapter; 826 lbs_adapter *adapter = priv->adapter;
827 int ret = 0; 827 int ret = 0;
828 u16 command = le16_to_cpu(resp->command); 828 u16 command = le16_to_cpu(resp->command);
829 u16 result = le16_to_cpu(resp->result); 829 u16 result = le16_to_cpu(resp->result);
@@ -852,8 +852,8 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
852 */ 852 */
853 if (result) { 853 if (result) {
854 lbs_deb_join("ADHOC_RESP: failed\n"); 854 lbs_deb_join("ADHOC_RESP: failed\n");
855 if (adapter->connect_status == LIBERTAS_CONNECTED) { 855 if (adapter->connect_status == LBS_CONNECTED) {
856 libertas_mac_event_disconnected(priv); 856 lbs_mac_event_disconnected(priv);
857 } 857 }
858 ret = -1; 858 ret = -1;
859 goto done; 859 goto done;
@@ -867,7 +867,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
867 escape_essid(bss->ssid, bss->ssid_len)); 867 escape_essid(bss->ssid, bss->ssid_len));
868 868
869 /* Send a Media Connected event, according to the Spec */ 869 /* Send a Media Connected event, according to the Spec */
870 adapter->connect_status = LIBERTAS_CONNECTED; 870 adapter->connect_status = LBS_CONNECTED;
871 871
872 if (command == CMD_RET(CMD_802_11_AD_HOC_START)) { 872 if (command == CMD_RET(CMD_802_11_AD_HOC_START)) {
873 /* Update the created network descriptor with the new BSSID */ 873 /* Update the created network descriptor with the new BSSID */
@@ -904,12 +904,12 @@ done:
904 return ret; 904 return ret;
905} 905}
906 906
907int libertas_ret_80211_ad_hoc_stop(wlan_private * priv, 907int lbs_ret_80211_ad_hoc_stop(lbs_private *priv,
908 struct cmd_ds_command *resp) 908 struct cmd_ds_command *resp)
909{ 909{
910 lbs_deb_enter(LBS_DEB_JOIN); 910 lbs_deb_enter(LBS_DEB_JOIN);
911 911
912 libertas_mac_event_disconnected(priv); 912 lbs_mac_event_disconnected(priv);
913 913
914 lbs_deb_leave(LBS_DEB_JOIN); 914 lbs_deb_leave(LBS_DEB_JOIN);
915 return 0; 915 return 0;