Deleted Added
full compact
ieee80211_sta.c (233452) ieee80211_sta.c (241138)
1/*-
2 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27#ifdef __FreeBSD__
1/*-
2 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27#ifdef __FreeBSD__
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_sta.c 233452 2012-03-25 03:11:57Z adrian $");
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_sta.c 241138 2012-10-02 17:45:19Z adrian $");
29#endif
30
31/*
32 * IEEE 802.11 Station mode support.
33 */
34#include "opt_inet.h"
35#include "opt_wlan.h"
36

--- 360 unchanged lines hidden (view full) ---

397 IEEE80211_RATE2MBS(ni->ni_txrate));
398 }
399#endif
400 ieee80211_scan_assoc_success(vap, ni->ni_macaddr);
401 ieee80211_notify_node_join(ni,
402 arg == IEEE80211_FC0_SUBTYPE_ASSOC_RESP);
403 break;
404 case IEEE80211_S_SLEEP:
29#endif
30
31/*
32 * IEEE 802.11 Station mode support.
33 */
34#include "opt_inet.h"
35#include "opt_wlan.h"
36

--- 360 unchanged lines hidden (view full) ---

397 IEEE80211_RATE2MBS(ni->ni_txrate));
398 }
399#endif
400 ieee80211_scan_assoc_success(vap, ni->ni_macaddr);
401 ieee80211_notify_node_join(ni,
402 arg == IEEE80211_FC0_SUBTYPE_ASSOC_RESP);
403 break;
404 case IEEE80211_S_SLEEP:
405 ieee80211_sta_pwrsave(vap, 0);
405 vap->iv_sta_ps(vap, 0);
406 break;
407 default:
408 goto invalid;
409 }
410 ieee80211_sync_curchan(ic);
411 if (ostate != IEEE80211_S_RUN &&
412 (vap->iv_flags_ext & IEEE80211_FEXT_SWBMISS)) {
413 /*

--- 19 unchanged lines hidden (view full) ---

433 if (ic->ic_newassoc != NULL)
434 ic->ic_newassoc(vap->iv_bss, ostate != IEEE80211_S_RUN);
435 break;
436 case IEEE80211_S_CSA:
437 if (ostate != IEEE80211_S_RUN)
438 goto invalid;
439 break;
440 case IEEE80211_S_SLEEP:
406 break;
407 default:
408 goto invalid;
409 }
410 ieee80211_sync_curchan(ic);
411 if (ostate != IEEE80211_S_RUN &&
412 (vap->iv_flags_ext & IEEE80211_FEXT_SWBMISS)) {
413 /*

--- 19 unchanged lines hidden (view full) ---

433 if (ic->ic_newassoc != NULL)
434 ic->ic_newassoc(vap->iv_bss, ostate != IEEE80211_S_RUN);
435 break;
436 case IEEE80211_S_CSA:
437 if (ostate != IEEE80211_S_RUN)
438 goto invalid;
439 break;
440 case IEEE80211_S_SLEEP:
441 ieee80211_sta_pwrsave(vap, 1);
441 vap->iv_sta_ps(vap, 1);
442 break;
443 default:
444 invalid:
445 IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE,
446 "%s: unexpected state transition %s -> %s\n", __func__,
447 ieee80211_state_name[ostate], ieee80211_state_name[nstate]);
448 break;
449 }

--- 941 unchanged lines hidden (view full) ---

1391 if ((tim->tim_bitctl&1) ||
1392 (min <= ix && ix <= max &&
1393 isset(tim->tim_bitmap - min, aid))) {
1394 /*
1395 * XXX Do not let bg scan kick off
1396 * we are expecting data.
1397 */
1398 ic->ic_lastdata = ticks;
442 break;
443 default:
444 invalid:
445 IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE,
446 "%s: unexpected state transition %s -> %s\n", __func__,
447 ieee80211_state_name[ostate], ieee80211_state_name[nstate]);
448 break;
449 }

--- 941 unchanged lines hidden (view full) ---

1391 if ((tim->tim_bitctl&1) ||
1392 (min <= ix && ix <= max &&
1393 isset(tim->tim_bitmap - min, aid))) {
1394 /*
1395 * XXX Do not let bg scan kick off
1396 * we are expecting data.
1397 */
1398 ic->ic_lastdata = ticks;
1399 ieee80211_sta_pwrsave(vap, 0);
1399 vap->iv_sta_ps(vap, 0);
1400 }
1401#endif
1402 ni->ni_dtim_count = tim->tim_count;
1403 ni->ni_dtim_period = tim->tim_period;
1404 }
1405 if (scan.csa != NULL &&
1406 (vap->iv_flags & IEEE80211_F_DOTH))
1407 ieee80211_parse_csaparams(vap, scan.csa, wh);

--- 396 unchanged lines hidden ---
1400 }
1401#endif
1402 ni->ni_dtim_count = tim->tim_count;
1403 ni->ni_dtim_period = tim->tim_period;
1404 }
1405 if (scan.csa != NULL &&
1406 (vap->iv_flags & IEEE80211_F_DOTH))
1407 ieee80211_parse_csaparams(vap, scan.csa, wh);

--- 396 unchanged lines hidden ---