Deleted Added
full compact
ieee80211_scan_sta.c (297405) ieee80211_scan_sta.c (298359)
1/*-
2 * Copyright (c) 2002-2009 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

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

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
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>
1/*-
2 * Copyright (c) 2002-2009 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

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

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
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__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_scan_sta.c 297405 2016-03-30 00:44:10Z adrian $");
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_scan_sta.c 298359 2016-04-20 18:29:30Z avos $");
28
29/*
30 * IEEE 802.11 station scanning support.
31 */
32#include "opt_wlan.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
28
29/*
30 * IEEE 802.11 station scanning support.
31 */
32#include "opt_wlan.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/endian.h>
37#include <sys/malloc.h>
38#include <sys/module.h>
39
40#include <sys/socket.h>
41
42#include <net/if.h>
43#include <net/if_var.h>
44#include <net/if_media.h>

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

780 * extract the number of spartial streams and
781 * map it to the highest MCS rate.
782 */
783 txstream = ((txparams & 0xc) >> 2) + 1;
784 i = txstream * 8 - 1;
785 } else
786 for (i = 31; i >= 0 && isclr(htcap->hc_mcsset, i); i--);
787 if (i >= 0) {
38#include <sys/malloc.h>
39#include <sys/module.h>
40
41#include <sys/socket.h>
42
43#include <net/if.h>
44#include <net/if_var.h>
45#include <net/if_media.h>

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

781 * extract the number of spartial streams and
782 * map it to the highest MCS rate.
783 */
784 txstream = ((txparams & 0xc) >> 2) + 1;
785 i = txstream * 8 - 1;
786 } else
787 for (i = 31; i >= 0 && isclr(htcap->hc_mcsset, i); i--);
788 if (i >= 0) {
788 caps = LE_READ_2(&htcap->hc_cap);
789 caps = le16dec(&htcap->hc_cap);
789 if ((caps & IEEE80211_HTCAP_CHWIDTH40) &&
790 (caps & IEEE80211_HTCAP_SHORTGI40))
791 rmax = ieee80211_htrates[i].ht40_rate_400ns;
792 else if (caps & IEEE80211_HTCAP_CHWIDTH40)
793 rmax = ieee80211_htrates[i].ht40_rate_800ns;
794 else if (caps & IEEE80211_HTCAP_SHORTGI20)
795 rmax = ieee80211_htrates[i].ht20_rate_400ns;
796 else

--- 1137 unchanged lines hidden ---
790 if ((caps & IEEE80211_HTCAP_CHWIDTH40) &&
791 (caps & IEEE80211_HTCAP_SHORTGI40))
792 rmax = ieee80211_htrates[i].ht40_rate_400ns;
793 else if (caps & IEEE80211_HTCAP_CHWIDTH40)
794 rmax = ieee80211_htrates[i].ht40_rate_800ns;
795 else if (caps & IEEE80211_HTCAP_SHORTGI20)
796 rmax = ieee80211_htrates[i].ht20_rate_400ns;
797 else

--- 1137 unchanged lines hidden ---