24 #include <linux/compiler.h>
25 #include <linux/errno.h>
26 #include <linux/if_arp.h>
27 #include <linux/in6.h>
30 #include <linux/kernel.h>
31 #include <linux/module.h>
32 #include <linux/netdevice.h>
33 #include <linux/pci.h>
36 #include <linux/slab.h>
37 #include <linux/tcp.h>
38 #include <linux/types.h>
39 #include <linux/wireless.h>
42 #include <linux/ctype.h>
47 static inline void rtllib_monitor_rx(
struct rtllib_device *ieee,
52 skb_reset_mac_header(skb);
56 memset(skb->cb, 0,
sizeof(skb->cb));
73 "expiring fragment cache entry "
74 "seq=%u last_frag=%u\n",
81 (entry->
last_frag + 1 == frag || frag == -1) &&
121 skb = dev_alloc_skb(ieee->
dev->mtu +
148 entry = rtllib_frag_cache_find(ieee, seq, frag, tid, hdr->
addr2,
161 static int rtllib_frag_cache_invalidate(
struct rtllib_device *ieee,
186 entry = rtllib_frag_cache_find(ieee, seq, -1, tid, hdr->
addr2,
191 "could not invalidate fragment cache "
192 "entry (seq=%u)\n", seq);
231 static unsigned char rfc1042_header[] = {
232 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
235 static unsigned char bridge_tunnel_header[] = {
236 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
268 if (skb->
len < 24 + 8)
273 ethertype = (pos[6] << 8) | pos[7];
288 if (crypt ==
NULL || crypt->
ops->decrypt_mpdu ==
NULL)
303 res = crypt->
ops->decrypt_mpdu(skb, hdrlen, crypt->
priv);
307 "decryption failed (SA= %pM"
308 ") res=%d\n", hdr->
addr2, res);
311 "mismatch (key %d)\n",
312 skb->
data[hdrlen + 3] >> 6);
329 if (crypt ==
NULL || crypt->
ops->decrypt_msdu ==
NULL)
343 res = crypt->
ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->
priv);
347 " (SA= %pM keyidx=%d)\n",
348 ieee->
dev->name, hdr->
addr2, keyidx);
357 #define IEEE_PACKET_RETRY_TIME (5*HZ)
365 u16 *last_seq, *last_frag;
410 last_seq = &entry->
seq_num[tid];
425 if ((*last_seq == seq) &&
427 if (*last_frag == frag)
429 if (*last_frag + 1 != frag)
461 pReorderEntry->
List.next = pList->
next;
462 pReorderEntry->
List.next->prev = &pReorderEntry->
List;
463 pReorderEntry->
List.prev = pList;
480 ethertype = (sub_skb->
data[6] << 8) | sub_skb->
data[7];
481 if (sub_skb->
len >= 8 &&
504 memset(sub_skb->cb, 0,
sizeof(sub_skb->cb));
507 sub_skb->
dev->stats.rx_packets++;
508 sub_skb->
dev->stats.rx_bytes += sub_skb->
len;
527 printk(
KERN_INFO "-------------->%s() error! RfdCnt >= REORDER_WIN_SIZE\n", __func__);
533 list_del_init(&pRxReorderEntry->
List);
554 bool bMatchWinStart =
false, bPktInBuf =
false;
558 " is %d, WinSize is %d\n", __func__, SeqNum,
591 bMatchWinStart =
true;
592 }
else if (
SN_LESS(WinEnd, SeqNum)) {
593 if (SeqNum >= (WinSize - 1))
612 if (bMatchWinStart) {
615 "IndicateSeq: %d, NewSeq: %d\n",
625 list_del_init(&pReorderEntry->
List);
633 "%s(): Duplicate packet is "
634 "dropped!! IndicateSeq: %d, "
648 "Pkt insert into struct buffer!! "
649 "IndicateSeq: %d, NewSeq: %d\n",
660 " There is no reorder entry!! Packet is "
683 "Packet(): Buffer overflow!!\n");
688 list_del_init(&pReorderEntry->
List);
695 " %d!\n", __func__, pReorderEntry->
SeqNum);
715 " Rx Reorer struct buffer full!!\n");
743 bool bIsAggregateFrame =
false;
744 u16 nSubframe_Length;
745 u8 nPadding_Length = 0;
753 bIsAggregateFrame =
true;
760 ChkLength = LLCOffset;
762 if (skb->
len <= ChkLength)
767 if (!bIsAggregateFrame) {
780 skb_reserve(sub_skb, 12);
797 nSubframe_Length = *((
u16 *)(skb->
data + 12));
798 nSubframe_Length = (nSubframe_Length >> 8) +
799 (nSubframe_Length << 8);
803 "pRfd->nTotalSubframe : %d\n",\
806 "Subframe Length: %d\n", __func__,
809 "nSubframe_Length is : %d\n", skb->
len,
827 sub_skb = dev_alloc_skb(nSubframe_Length + 12);
828 skb_reserve(sub_skb, 12);
829 data_ptr = (
u8 *)
skb_put(sub_skb, nSubframe_Length);
830 memcpy(data_ptr, skb->
data, nSubframe_Length);
836 "Subframes! Packets dropped!\n");
842 nPadding_Length = 4 - ((nSubframe_Length +
844 if (nPadding_Length == 4)
847 if (skb->
len < nPadding_Length)
859 static size_t rtllib_rx_get_hdrlen(
struct rtllib_device *ieee,
881 static int rtllib_rx_check_duplicate(
struct rtllib_device *ieee,
886 u8 frag, type, stype;
894 if ((ieee->
pHTInfo->bCurRxReorderEnable ==
false) ||
899 if (is_duplicate_packet(ieee, hdr))
915 " the check!!\n", __func__);
923 static void rtllib_rx_extract_addr(
struct rtllib_device *ieee,
963 if (((fc & RTLLIB_FCTL_DSTODS) != RTLLIB_FCTL_DSTODS)
989 "RX: dropped data frame "
990 "with no data (type=0x%02x, "
1003 if (is_multicast_ether_addr(dst)) {
1019 if (skb->
len >= hdrlen + 3)
1020 idx = skb->
data[hdrlen + 3] >> 6;
1025 if (*crypt && ((*crypt)->ops ==
NULL ||
1026 (*crypt)->ops->decrypt_mpdu ==
NULL))
1037 ieee->
ieee_stats.rx_discards_undecryptable++;
1064 keyidx = rtllib_rx_frame_decrypt(ieee, skb, crypt);
1073 struct sk_buff *frag_skb = rtllib_frag_cache_get(ieee, hdr);
1078 "Rx cannot get skb from fragment "
1079 "cache (morefrag=%d seq=%u frag=%u)\n",
1080 (fc & RTLLIB_FCTL_MOREFRAGS) != 0,
1088 if (frag_skb->
tail + flen > frag_skb->
end) {
1090 "reassembled frame did not fit skb\n",
1092 rtllib_frag_cache_invalidate(ieee, hdr);
1109 if (fc & RTLLIB_FCTL_MOREFRAGS) {
1120 rtllib_frag_cache_invalidate(ieee, hdr);
1126 rtllib_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) {
1132 if (crypt && !(fc & RTLLIB_FCTL_WEP) && !ieee->
open_wep) {
1134 rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
1141 eap_get_type(eap->
type));
1144 "encryption configured, but RX "
1145 "frame not encrypted (SA= %pM)\n",
1151 if (crypt && !(fc & RTLLIB_FCTL_WEP) &&
1152 rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
1156 eap_get_type(eap->
type));
1159 if (crypt && !(fc & RTLLIB_FCTL_WEP) && !ieee->
open_wep &&
1160 !rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
1162 "dropped unencrypted RX data "
1164 " (drop_unencrypted=1)\n",
1169 if (rtllib_is_eapol_frame(ieee, skb, hdrlen))
1191 static void rtllib_rx_indicate_pkt_legacy(
struct rtllib_device *ieee,
1211 ethertype = (sub_skb->
data[6] << 8) | sub_skb->
data[7];
1212 if (sub_skb->
len >= 8 &&
1230 ieee->
stats.rx_packets++;
1231 ieee->
stats.rx_bytes += sub_skb->
len;
1233 if (is_multicast_ether_addr(dst))
1234 ieee->
stats.multicast++;
1237 memset(sub_skb->cb, 0,
sizeof(sub_skb->cb));
1240 sub_skb->
dev->stats.rx_packets++;
1241 sub_skb->
dev->stats.rx_bytes += sub_skb->
len;
1258 u16 fc, sc, SeqNum = 0;
1259 u8 type, stype, multicast = 0, unicast = 0, nr_subframes = 0,
TID = 0;
1262 bool bToOtherSTA =
false;
1272 multicast = is_multicast_ether_addr(hdr->
addr1);
1273 unicast = !multicast;
1274 if (unicast && (compare_ether_addr(dev->
dev_addr, hdr->
addr1) != 0)) {
1282 hdrlen = rtllib_rx_get_hdrlen(ieee, skb, rx_stats);
1283 if (skb->
len < hdrlen) {
1284 printk(
KERN_INFO "%s():ERR!!! skb->len is smaller than hdrlen\n", __func__);
1289 ret = rtllib_rx_check_duplicate(ieee, skb, multicast);
1301 if (rtllib_rx_frame_mgmt(ieee, skb, rx_stats, type, stype))
1317 rtllib_rx_extract_addr(ieee, hdr, dst, src, bssid);
1320 ret = rtllib_rx_data_filter(ieee, fc, dst, src, bssid, hdr->
addr2);
1324 if (skb->
len == hdrlen)
1329 && (ieee->
polling) && (!bToOtherSTA)) {
1339 ret = rtllib_rx_get_crypt(ieee, skb, &crypt, hdrlen);
1344 ret = rtllib_rx_decrypt(ieee, skb, rx_stats, crypt, hdrlen);
1353 && !is_multicast_ether_addr(hdr->
addr1)
1354 && (!bToOtherSTA)) {
1355 TID = Frame_QoSTID(skb->
data);
1358 if (
TID != 0 &&
TID != 3)
1368 "%s(): kmalloc rxb error\n", __func__);
1392 rtllib_rx_check_leave_lps(ieee, unicast, nr_subframes);
1396 if (ieee->
pHTInfo->bCurRxReorderEnable ==
false || pTS ==
NULL || bToOtherSTA)
1397 rtllib_rx_indicate_pkt_legacy(ieee, rx_stats, rxb, dst, src);
1411 ieee->
stats.rx_dropped++;
1432 if (skb->
len < hdrlen) {
1433 printk(
KERN_INFO "%s():ERR!!! skb->len is smaller than hdrlen\n", __func__);
1443 rtllib_monitor_rx(ieee, skb, rx_stats, hdrlen);
1444 ieee->
stats.rx_packets++;
1464 if ((
NULL == ieee) || (
NULL == skb) || (
NULL == rx_stats)) {
1468 if (skb->
len < 10) {
1476 ret = rtllib_rx_InfraAdhoc(ieee, skb, rx_stats);
1480 ret = rtllib_rx_Master(ieee, skb, rx_stats);
1483 ret = rtllib_rx_Monitor(ieee, skb, rx_stats);
1486 ret = rtllib_rx_Mesh(ieee, skb, rx_stats);
1496 ieee->
stats.rx_dropped++;
1534 if ((info_element ==
NULL) || (element_param ==
NULL))
1545 ret = rtllib_verify_qos_info(&element_param->
info_element,
1553 static int rtllib_read_qos_info_element(
struct
1561 if (element_info ==
NULL)
1563 if (info_element ==
NULL)
1570 element_info->
length = info_element->
len;
1575 ret = rtllib_verify_qos_info(element_info,
1598 aci = (ac_params->
aci_aifsn & 0x60) >> 5;
1599 acm = (ac_params->
aci_aifsn & 0x10) >> 4;
1601 if (aci >= QOS_QUEUE_NUM)
1607 qos_data->
wmm_acm |= (0x01<<0)|(0x01<<3);
1612 qos_data->
wmm_acm |= (0x01<<4)|(0x01<<5);
1617 qos_data->
wmm_acm |= (0x01<<6)|(0x01<<7);
1623 qos_data->
wmm_acm |= (0x01<<1)|(0x01<<2);
1630 qos_param->
aifs[aci] = (qos_param->
aifs[aci] < 2) ? 2 : qos_param->
aifs[aci];
1636 qos_param->
flag[aci] =
1637 (ac_params->
aci_aifsn & 0x10) ? 0x01 : 0x00;
1655 rc = rtllib_read_qos_info_element(&qos_info_element, info_element);
1658 network->
qos_data.param_count = qos_info_element.ac_info & 0x0F;
1663 rc = rtllib_read_qos_param_element(¶m_element,
1666 rtllib_qos_convert_ac_to_parameters(¶m_element,
1670 param_element.info_element.ac_info & 0x0F;
1681 #define MFIE_STRING(x) case MFIE_TYPE_ ##x: return #x
1683 static const char *get_info_element_string(
u16 id)
1717 static inline void rtllib_extract_country_ie(
1724 if (info_element->
len != 0) {
1749 u16 tmp_htcap_len = 0;
1750 u16 tmp_htinfo_len = 0;
1751 u16 ht_realtek_agg_len = 0;
1756 while (length >=
sizeof(*info_element)) {
1757 if (
sizeof(*info_element) + info_element->
len > length) {
1759 "info_element->len + 2 > left : "
1760 "info_element->len+2=%zd left=%d, id=%d.\n",
1762 sizeof(*info_element),
1763 length, info_element->
id);
1770 switch (info_element->
id) {
1773 info_element->
len)) {
1781 if (network->
ssid_len < IW_ESSID_MAX_SIZE)
1783 IW_ESSID_MAX_SIZE - network->
ssid_len);
1793 for (i = 0; i < network->
rates_len; i++) {
1795 p +=
snprintf(p,
sizeof(rates_str) -
1796 (p - rates_str),
"%02X ",
1798 if (rtllib_is_ofdm_rate
1799 (info_element->
data[i])) {
1801 if (info_element->
data[i] &
1807 if (rtllib_is_cck_rate
1808 (info_element->
data[i])) {
1823 p +=
snprintf(p,
sizeof(rates_str) -
1824 (p - rates_str),
"%02X ",
1826 if (rtllib_is_ofdm_rate
1827 (info_element->
data[i])) {
1829 if (info_element->
data[i] &
1842 info_element->
data[0]);
1855 if (info_element->
len < 4)
1858 network->
tim.tim_count = info_element->
data[0];
1859 network->
tim.tim_period = info_element->
data[1];
1869 if (info_element->
data[2] & 1)
1872 offset = (info_element->
data[2] >> 1)*2;
1876 ieee->
assoc_id > 8*(offset + info_element->
len - 3))
1879 offset = (ieee->
assoc_id / 8) - offset;
1880 if (info_element->
data[3 + offset] &
1906 if (!rtllib_parse_qos_info_param_IE(info_element,
1909 if (info_element->
len >= 4 &&
1910 info_element->
data[0] == 0x00 &&
1911 info_element->
data[1] == 0x50 &&
1912 info_element->
data[2] == 0xf2 &&
1913 info_element->
data[3] == 0x01) {
1920 if (info_element->
len == 7 &&
1921 info_element->
data[0] == 0x00 &&
1922 info_element->
data[1] == 0xe0 &&
1923 info_element->
data[2] == 0x4c &&
1924 info_element->
data[3] == 0x01 &&
1925 info_element->
data[4] == 0x02)
1928 if (tmp_htcap_len == 0) {
1929 if (info_element->
len >= 4 &&
1930 info_element->
data[0] == 0x00 &&
1931 info_element->
data[1] == 0x90 &&
1932 info_element->
data[2] == 0x4c &&
1933 info_element->
data[3] == 0x033) {
1936 if (tmp_htcap_len != 0) {
1938 network->
bssht.bdHTCapLen = tmp_htcap_len >
sizeof(network->
bssht.bdHTCapBuf) ?
1939 sizeof(network->
bssht.bdHTCapBuf) : tmp_htcap_len;
1943 if (tmp_htcap_len != 0) {
1944 network->
bssht.bdSupportHT =
true;
1947 network->
bssht.bdSupportHT =
false;
1948 network->
bssht.bdHT1R =
false;
1953 if (tmp_htinfo_len == 0) {
1954 if (info_element->
len >= 4 &&
1955 info_element->
data[0] == 0x00 &&
1956 info_element->
data[1] == 0x90 &&
1957 info_element->
data[2] == 0x4c &&
1958 info_element->
data[3] == 0x034) {
1960 if (tmp_htinfo_len != 0) {
1962 if (tmp_htinfo_len) {
1963 network->
bssht.bdHTInfoLen = tmp_htinfo_len >
sizeof(network->
bssht.bdHTInfoBuf) ?
1964 sizeof(network->
bssht.bdHTInfoBuf) : tmp_htinfo_len;
1974 if (network->
bssht.bdSupportHT) {
1975 if (info_element->
len >= 4 &&
1976 info_element->
data[0] == 0x00 &&
1977 info_element->
data[1] == 0xe0 &&
1978 info_element->
data[2] == 0x4c &&
1979 info_element->
data[3] == 0x02) {
1981 memcpy(ht_realtek_agg_buf, info_element->
data, info_element->
len);
1983 if (ht_realtek_agg_len >= 5) {
1985 network->
bssht.bdRT2RTAggregation =
true;
1987 if ((ht_realtek_agg_buf[4] == 1) && (ht_realtek_agg_buf[5] & 0x02))
1988 network->
bssht.bdRT2RTLongSlotTime =
true;
1994 if (ht_realtek_agg_len >= 5) {
2000 if ((info_element->
len >= 3 &&
2001 info_element->
data[0] == 0x00 &&
2002 info_element->
data[1] == 0x05 &&
2003 info_element->
data[2] == 0xb5) ||
2004 (info_element->
len >= 3 &&
2005 info_element->
data[0] == 0x00 &&
2006 info_element->
data[1] == 0x0a &&
2007 info_element->
data[2] == 0xf7) ||
2008 (info_element->
len >= 3 &&
2009 info_element->
data[0] == 0x00 &&
2010 info_element->
data[1] == 0x10 &&
2011 info_element->
data[2] == 0x18)) {
2014 if (info_element->
len >= 3 &&
2015 info_element->
data[0] == 0x00 &&
2016 info_element->
data[1] == 0x0c &&
2017 info_element->
data[2] == 0x43)
2019 if ((info_element->
len >= 3 &&
2020 info_element->
data[0] == 0x00 &&
2021 info_element->
data[1] == 0x03 &&
2022 info_element->
data[2] == 0x7f) ||
2023 (info_element->
len >= 3 &&
2024 info_element->
data[0] == 0x00 &&
2025 info_element->
data[1] == 0x13 &&
2026 info_element->
data[2] == 0x74))
2029 if ((info_element->
len >= 3 &&
2030 info_element->
data[0] == 0x00 &&
2031 info_element->
data[1] == 0x50 &&
2032 info_element->
data[2] == 0x43))
2034 if (info_element->
len >= 3 &&
2035 info_element->
data[0] == 0x00 &&
2036 info_element->
data[1] == 0x40 &&
2037 info_element->
data[2] == 0x96)
2041 if (info_element->
len >= 3 &&
2042 info_element->
data[0] == 0x00 &&
2043 info_element->
data[1] == 0x0a &&
2044 info_element->
data[2] == 0xf5)
2047 if (info_element->
len > 4 &&
2048 info_element->
data[0] == 0x00 &&
2049 info_element->
data[1] == 0x40 &&
2050 info_element->
data[2] == 0x96 &&
2051 info_element->
data[3] == 0x01) {
2052 if (info_element->
len == 6) {
2071 if (info_element->
len > 4 &&
2072 info_element->
data[0] == 0x00 &&
2073 info_element->
data[1] == 0x40 &&
2074 info_element->
data[2] == 0x96 &&
2075 info_element->
data[3] == 0x03) {
2076 if (info_element->
len == 5) {
2084 if (info_element->
len > 4 &&
2085 info_element->
data[0] == 0x00 &&
2086 info_element->
data[1] == 0x50 &&
2087 info_element->
data[2] == 0xf2 &&
2088 info_element->
data[3] == 0x04) {
2111 if (tmp_htcap_len != 0) {
2113 network->
bssht.bdHTCapLen = tmp_htcap_len >
sizeof(network->
bssht.bdHTCapBuf) ?
2114 sizeof(network->
bssht.bdHTCapBuf) : tmp_htcap_len;
2117 network->
bssht.bdHTCapLen);
2119 network->
bssht.bdSupportHT =
true;
2121 network->
bssht.bdHTCapBuf))->
MCS[1]) == 0;
2125 (network->
bssht.bdHTCapBuf))->ChlWidth);
2127 network->
bssht.bdSupportHT =
false;
2128 network->
bssht.bdHT1R =
false;
2137 tmp_htinfo_len =
min(info_element->
len, (
u8)MAX_IE_LEN);
2138 if (tmp_htinfo_len) {
2140 network->
bssht.bdHTInfoLen = tmp_htinfo_len >
2141 sizeof(network->
bssht.bdHTInfoBuf) ?
2142 sizeof(network->
bssht.bdHTInfoBuf) :
2146 network->
bssht.bdHTInfoLen);
2170 "QoS Error need to parse QOS_PARAMETER IE\n");
2176 rtllib_extract_country_ie(ieee, info_element, network,
2182 (
"Unsupported info element: %s (%d)\n",
2183 get_info_element_string(info_element->
id),
2188 length -=
sizeof(*info_element) + info_element->
len;
2196 !network->
bssht.bdRT2RTAggregation)
2203 static inline u8 rtllib_SignalStrengthTranslate(
u8 CurrSS)
2207 if (CurrSS >= 71 && CurrSS <= 100)
2208 RetSS = 90 + ((CurrSS - 70) / 3);
2209 else if (CurrSS >= 41 && CurrSS <= 70)
2210 RetSS = 78 + ((CurrSS - 40) / 3);
2211 else if (CurrSS >= 31 && CurrSS <= 40)
2212 RetSS = 66 + (CurrSS - 30);
2213 else if (CurrSS >= 21 && CurrSS <= 30)
2214 RetSS = 54 + (CurrSS - 20);
2215 else if (CurrSS >= 5 && CurrSS <= 20)
2216 RetSS = 42 + (((CurrSS - 5) * 2) / 3);
2217 else if (CurrSS == 4)
2219 else if (CurrSS == 3)
2221 else if (CurrSS == 2)
2223 else if (CurrSS == 1)
2231 static long rtllib_translate_todbm(
u8 signal_strength_index)
2235 signal_power = (
long)((signal_strength_index + 1) >> 1);
2238 return signal_power;
2241 static inline int rtllib_network_init(
2301 (stats->
len -
sizeof(*beacon)),
2316 if (network->
mode == 0) {
2319 escape_essid(network->
ssid,
2325 if (network->
bssht.bdSupportHT) {
2334 stats->
noise = rtllib_translate_todbm((
u8)(100-stats->
signal)) - 25;
2359 static inline void update_ibss_network(
struct rtllib_network *dst,
2406 dst->
bssht.bdSupportHT = src->
bssht.bdSupportHT;
2407 dst->
bssht.bdRT2RTAggregation = src->
bssht.bdRT2RTAggregation;
2408 dst->
bssht.bdHTCapLen = src->
bssht.bdHTCapLen;
2410 src->
bssht.bdHTCapLen);
2411 dst->
bssht.bdHTInfoLen = src->
bssht.bdHTInfoLen;
2413 src->
bssht.bdHTInfoLen);
2414 dst->
bssht.bdHTSpecVer = src->
bssht.bdHTSpecVer;
2415 dst->
bssht.bdRT2RTLongSlotTime = src->
bssht.bdRT2RTLongSlotTime;
2434 old_param = dst->
qos_data.param_count;
2439 if (dst->
qos_data.supported == 1) {
2442 (
"QoS the network %s is QoS supported\n",
2446 (
"QoS the network is QoS supported\n");
2449 dst->
qos_data.old_param_count = old_param;
2453 if (src->
wmm_param[0].ac_aci_acm_aifsn ||
2477 static inline int is_beacon(
__le16 fc)
2508 static inline void rtllib_process_probe_response(
2516 unsigned long flags;
2525 "'%s' ( %pM ): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
2526 escape_essid(info_element->
data, info_element->
len),
2543 (beacon->
capability & (1<<0x0)) ?
'1' :
'0');
2545 if (rtllib_network_init(ieee, beacon, network, stats)) {
2547 escape_essid(info_element->
data,
2552 "PROBE RESPONSE" :
"BEACON");
2562 if (IsPassiveChannel(ieee, network->
channel)) {
2564 "filter probe response at channel(%d).\n",
2592 if (is_beacon(beacon->
header.frame_ctl)) {
2598 if (is_same_network(target, network,
2601 if ((oldest ==
NULL) ||
2615 escape_essid(target->
ssid,
2627 escape_essid(network->
ssid,
2631 "PROBE RESPONSE" :
"BEACON");
2632 memcpy(target, network,
sizeof(*target));
2638 escape_essid(target->
ssid,
2642 "PROBE RESPONSE" :
"BEACON");
2662 spin_unlock_irqrestore(&ieee->
lock, flags);
2663 if (is_beacon(beacon->
header.frame_ctl) &&
2692 rtllib_process_probe_response(
2699 tasklet_schedule(&ieee->
ps_task);
2707 rtllib_process_probe_response(ieee,