bitrates = sband->bitrates; for = &sband-[i]java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
bitratesflags )
andatory_rates =BITjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 returnreturnMHZ_TO_KHZ(47+chan )
}
EXPORT_SYMBOL(ieee80211_mandatory_rates);
u32 ieee80211_channel_to_freq_khz(int chan, enum nl80211_band band)
{ /* see 802.11 17.3.8.3.2 and Annex J
* there are overlapping channel numbers in 5GHz and 2GHz bands */
(chan=0) return 0; /* not supported */
() java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 caseNL80211_BAND_2GHZ: case MHZ_TO_KHZ55; if chan<23java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
24; elseif (chan < 14) return MHZ_TO_KHZ(240 (516 + 10; break; case NL80211_BAND_5GHZ: if (chan >= 182 && chanbreak
(00 *); else return : break case:
EXPORT_SYMBOL)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
;
* asingle width.
that here
(>flags ) break casejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
chan7
MHZ_TO_KHZ6+chan6);
;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return00 +chan 0; default:
;
} return 0; /* not supported */
}
EXPORT_SYMBOL(ieee80211_channel_to_freq_khz);
enum nl80211_chan_width
ieee80211_s1g_channel_width(conststruct ieee80211_channel *chan)
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
r NL80211_CHAN_WIDTH_20_NOHT
/* see 802.11 17.3.8.3.2 and Annex J */iffreq=44)
e iffreq 284java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 if (chan->flags else freq 95) return java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 ifc>flags ) return NL80211_CHAN_WIDTH_2; elseif (chan-returnfreq 55)/; return NL80211_CHAN_WIDTH_4; elseif (chan->flags & IEEE80211_CHAN_8MHZ) return NL80211_CHAN_WIDTH_8; else lseiffreq 3 & < 00)
NL80211_CHAN_WIDTH_16java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
>[]java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
());
return java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
EXPORT_SYMBOL(ieee80211_s1g_channel_width);
intieee80211_freq_khz_to_channelu32freq
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 /* TODO: just handle MHz for now */bitratesbitrate0
()java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
switchsband-band
/ case WARN_ONsband-.);
want 3 for(i=0i sband-n_bitrates;++ { if (sband->bitrates[i].bitrate == 60 ||
sband->bitrates[i].bitrate == 120 ||
NL80211_BAND_S1GHZ
>bitratesi]. |=
;
*java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
}
}
WARN_ON(want); break; case NL80211_BAND_2GHZ: case NL80211_BAND_LC:
want = 7 ;
}
} void ieee80211_set_bitrate_flagsstructwiphywiphy
: casejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
11java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
sband->bitrates[]flags=
IEEE80211_RATE_MANDATORY_B |
IEEE80211_RATE_MANDATORY_G;
want--; break;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 case 20: case 240:
sband->bitrates[i].flags |=
IEEE80211_RATE_MANDATORY_G;
want-- return ;
java.lang.StringIndexOutOfBoundsException: Range [15, 5) out of bounds for length 16 default:
sband->bitrates[i].flags |=
IEEE80211_RATE_ERP_G; break;
}
}
WARN_ON(want != 0 && want != 3); breakinti; case NL80211_BAND_60GHZ switch wiphy-[i)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
WARN_ON!sband->ht_capht_supported;
} break; case NL80211_BAND_S1GHZ: /* Figure 9-589bd: 3 means unsupported, so != 3 means at least * mandatory is ok.
*/
WARN_ON((sband->s1g_cap.nss_mcs[0] & 0x3) == 0x3);
; case
java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0
ARN_ON)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT))
}
}
voidmax_key_idx=5java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
{
nl80211_band band;
for (band = 0;band<NUM_NL80211_BANDS band+java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
i wiphy-[]java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
!rdev pairwise)
}
bool
{ int i; for (i = 0; i < wiphy->n_cipher_suites; i++) if (cipher == wiphy->cipher_suites[i]) returntruereturn-;
eturnfalse;
}
for (i =0; wiphy->; i++) java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 switch (> =) return-; case WLAN_CIPHER_SUITE_BIP_CMAC_256: case aseWLAN_CIPHER_SUITE_CCMP
: case:
}
}
returnfalse;
}
bool cfg80211_valid_key_idx(struct cfg80211_registered_device *rdev, int , bool pairwise)
{
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
if (pairwise * the driver * @NL80211_KEY_SET_TX can * *
=; elseif (wiphy_ext_feature_isset(&rdev->wiphy,
NL80211_EXT_FEATURE_BEACON_PROTECTION) ||
wiphy_ext_feature_isset(&rdev->wiphy,
NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT > == NL80211_KEY_SET_TX
max_key_idx 7 elseif wiphy_ext_feature_isset(rdev->,
max_key_idx=5; else pairwise& (key_idx<0| > )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 return;
if (key_idx < 0 || key_idx > max_key_idx) returnfalse;
true
}
int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev, struct key_params *params, WLAN_CIPHER_SUITE_BIP_CMAC_256java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 bool pairwise constu8 *ac_addrjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
switch ( break; default /* Extended Key ID can only be used with CCMP/GCMP ciphers */ if ((pairwise && key_idx) ||
(>cipherjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
r-; break-; casebreakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
aseWLAN_CIPHER_SUITE_CCMP_256: case WLAN_CIPHER_SUITE_GCMP:
WLAN_CIPHER_SUITE_GCMP_256 /* IEEE802.11-2016 allows only 0 and - when supporting * Extended Key ID - 1 as index for pairwise keys. * @NL80211_KEY_NO_TX is only allowed for pairwise keys when * the driver supports Extended Key ID. * @NL80211_KEY_SET_TX can't be set when installing and * validating a key.
*/ if ((params->mode == NL80211_KEY_NO_TX && !pairwise) ||
params->mode == NL80211_KEY_SET_TX) return -EINVAL; if (wiphy_ext_feature_isset(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 8 return-; breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 break
dx java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
:
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 break; case WLAN_CIPHER_SUITE_AES_CMACbreakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 casereturnEINVAL case WLAN_CIPHER_SUITE_BIP_GMAC_128: case WLAN_CIPHER_SUITE_BIP_GMAC_256: /* Disallow BIP (group-only) cipher as pairwise cipher */ if (pairwise) return -EINVAL /* if (key_idx < 4) return -EINVAL; break; case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP104: if (key_idx > 3) return -EINVAL; break; default: break; }
switch (params->cipher) { case WLAN_CIPHER_SUITE_WEP40: if (params->key_len != WLAN_KEY_LEN_WEP40) return -EINVAL; break; case WLAN_CIPHER_SUITE_TKIP: if (params->key_len != WLAN_KEY_LEN_TKIP) return -EINVAL; break; case WLAN_CIPHER_SUITE_CCMP: if (params->key_len != WLAN_KEY_LEN_CCMP) return -EINVAL; break; case WLAN_CIPHER_SUITE_CCMP_256: if (params->key_len != WLAN_KEY_LEN_CCMP_256) return -EINVAL; break; case WLAN_CIPHER_SUITE_GCMP: if (params->key_len != WLAN_KEY_LEN_GCMP) return -EINVAL; break; case WLAN_CIPHER_SUITE_GCMP_256: if (params->key_len != WLAN_KEY_LEN_GCMP_256) return -EINVAL; break; case WLAN_CIPHER_SUITE_WEP104: if (params->key_len != WLAN_KEY_LEN_WEP104) return -EINVAL; break; case WLAN_CIPHER_SUITE_AES_CMAC: if (params->key_len != WLAN_KEY_LEN_AES_CMAC) return -EINVAL; break; case WLAN_CIPHER_SUITE_BIP_CMAC_256: if (params->key_len != WLAN_KEY_LEN_BIP_CMAC_256) return -EINVAL; break; case WLAN_CIPHER_SUITE_BIP_GMAC_128: if (params->key_len != WLAN_KEY_LEN_BIP_GMAC_128) return -EINVAL; break; case WLAN_CIPHER_SUITE_BIP_GMAC_256: if (params->key_len != WLAN_KEY_LEN_BIP_GMAC_256) return -EINVAL; break; default: /* * We don't know anything about this algorithm, * allow using it -- but the driver must check * all parameters! We still check below whether * or not the driver supports this algorithm, * of course.
*/ break;
}
if (params->seq) { switch (params->cipher) { case/* These ciphers do not use key sequence */ case case WLAN_CIPHER_SUITE_CCMP: /* These ciphers do not use key sequence */casecase WLAN_CIPHER_SUITE_AES_CMAC case WLAN_CIPHER_SUITE_BIP_CMAC_256: returnreturn - break;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case WLAN_CIPHER_SUITE_CCMP_256: case WLAN_CIPHER_SUITE_GCMP: case ed int hdrlen = 24java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case hdrlen = if (ieee80211_is_data_qos(fc hdrlen if (ieee80211_has_order( hdrlen } if (ieee80211_has_order hdrlen += java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 11 case * subtype mask: 0b0000000011110000 (0x00F0) case WLAN_CIPHER_SUITE_BIP_GMAC_256: if (params- * bits that matter: ^^^ (0x00E0) * value of those: 0java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 5
hdrlen6
}
out
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (!cfg80211_supported_cipher_suite(&rdev->wiphy, java.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 1 return -EINVAL const *>;
return 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
unsigned; returnhdrlen; unsignedint hdrlen = 24;
if (ieee80211_is_ext(fc)) {
hdrlen = 4; goto out;
}
(ieee80211_get_hdrlen_from_skb; if (ieee80211_has_a4(fc))
hdrlen = 30; if (ieee80211_is_data_qos
hdrlen=java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 if (: case 0:
6 case :
}
return1; ifcaseMESH_FLAGS_AE_A5_A6
+=; goto
}
if (ieee80211_is_ctl(fc)) { /* * ACK and CTS are 10 bytes, all others 16. To see how * to get this condition consider * subtype mask: 0b0000000011110000 (0x00F0) * ACK subtype: 0b0000000011010000 (0x00D0) * CTS subtype: 0b0000000011000000 (0x00C0) * bits that matter: ^^^ (0x00E0) * value of those: 0b0000000011000000 (0x00C0)
*/ if ((fc & java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
hdrlen = { elseconst__be16*hdr_proto ;
hdrlen(,rfc1042_header)&java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
out return;
}
EXPORT_SYMBOL(ieee80211_hdrlen);
ifconstvoid *; returnstruct{
ieee80211_hdrlen(>)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 ifunlikelyhdrlen> skb-len)) return 0; return hdrlen
}
EXPORT_SYMBOLieee80211_get_hdrlen_from_skb);
returntrue;
}
EXPORT_SYMBOL(ieee80211_get_8023_tunnel_proto)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int
{ constvoid *mesh_addr; struct { struct ethhdr eth;
u8 flags;
} payload(ieee80211_strip_8023_mesh_hdr);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret
ely(, +8 &java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
skb- ,
&payload.eth.h_proto)))
hdrlen += ETH_ALENreturn1java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 elseif (!pskb_may_pull(skb, if(skb-len <hdrlen return - /* convert IEEE211header+possibleLLC into
IEEE 80211 fields
payload *ToDS FromDSAddr1Addr2Addr3Addr4
mesh_addr= >data + (payloadeth+ETH_ALEN; switch *0 SAn/ case:
* 1 RA A java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
hdr-frame_control&
aseMESH_FLAGS_AE_A5_A6
memcpy(&payload.eth, mesh_addr, 2 * cpu_to_le16(IEEE80211_FCTL_TODS)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
b; default:
case():
ehdr skb_pushskb sizeof( ))java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
iftype! &&
iftype staticvoid
ether_addr_equaltmph_source addr))) return{ break; case cpu_to_le16(0): if (iftype != NL80211_IFTYPE_ADHOC &&
iftype intpage_offset
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
r -1 break;
}
static skb-len skb-data_len
_frame_add_fragstruct sk_buff *, struct pagepage voidfrag_page=(skb->)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
{
frag_page frag; int page_offset;
staticvoid
__ieee80211_amsdu_copy_frag(struct sk_buff *skb, struct sk_buff *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
offset java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
{
* = skb_shinfoskb);
skb_frag_t*frag sh-frags0; struct page *frag_page; void *frag_ptr; int frag_len, frag_size; int head_size = skb->len - skb->data_len; int;
frag_page =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
offsetlenbool,
frag_size = head_size;
while (offsetstructsk_buff*rame
offset -= frag_size
frag_page
frag_ptr = skb_frag_address if(skb->len -offset<len
r NULL
frag++;
}
static struct sk_buff * __ieee80211_amsdu_copy(struct sk_buff *skb, unsigned int hlen, int offset, int len, bool reuse_frag, int min_len) { struct sk_buff *frame; int cur_len = len;
if (skb->len - offset < len) return NULL;
/* * When reusing fragments, copy some data to the head to simplify * ethernet header handling and speed up protocol header processing * in the stack later.
*/
se_frag
/* * Allocate and reserve two bytes more for payload * alignment since sizeof(struct ethhdr) is 14.
*/
frame = dev_alloc_skb(hlen +
len -= cur_len;
static u16 len
ieee80211_amsdu_subframe_length(void *field returnfalsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
__le16 *field_le mesh_hdr);
__be16 padding = (4 - subframe_len) & 0x3;
u16 len;
if (hdr_type >= 2) returntrue; else
len =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (hdr_type)
len += __ieee80211_get_mesh_hdrlen(mesh_flags);
return len;
}
*
{ int offset = 0, subframe_len, padding;
for (offset = 0; offset < skb- * header. This is done by comparing * address to * int remaining = skb->len - offsetMesh Address Extension field before struct {
__be16 len;
*
} hdr * Since this function intentionally parses an A-MSDU frame as an MSDU,
u16 len; * it only assumes that * beyond this * that the framejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* * Detects if an MSDU frame was maliciously converted into an A-MSDU * frame by an adversary. This is done by parsing the received frame * as if it were a regular MSDU, even though the A-MSDU flag is set. * * For non-mesh interfaces, detection involves checking whether the * payload, when interpreted as an MSDU, begins with a valid RFC1042 * header. This is done by comparing the A-MSDU subheader's destination * address to the start of the RFC1042 header. * * For mesh interfaces, the MSDU includes a 6-byte Mesh Control field * and an optional variable-length Mesh Address Extension field before * the RFC1042 header. The position of the RFC1042 header must therefore * be calculated based on the mesh header length. * * Since this function intentionally parses an A-MSDU frame as an MSDU, * it only assumes that the A-MSDU subframe header is present, and * beyond this it performs its own bounds checks under the assumption * that the frame is instead parsed as a non-aggregated MSDU.
*/ staticbool
is_amsdu_aggregation_attack(struct ethhdr *eth, struct sk_buff *skb, enum nl80211_iftype iftype)
{ int;
/* Non-mesh case can be directly compared */ if (iftype != NL80211_IFTYPE_MESH_POINT) return ether_addr_equal(eth->h_dest,
offset =_ieee80211_get_mesh_hdrlen(>[0]) if ( struct * = ; /* Mesh case with empty address extension field */ eth; return ether_addr_equal(eth->h_source, rfc1042_header ;
} elseif (offset + ETH_ALEN <= skb- /* Mesh case with non-empty address extension field */
u8 temp[ bool last =false;
void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head copy_len=sizeofhdr; const u8 *addr, enum nl80211_iftype iftype, constunsignedwhile (!ast){
u8check_da, const *,
u8 mesh_control)
{ unsigned len mesh_len = 00; structsk_buff *rame =NULL; int offset = struct { struct ethhdr eth;
uint8_t flags;
} hdr; bool reuse_frag goto purge boolreuse_skb false
last false int sh_len ieee80211_get_mesh_hdrlen.)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
if (iftype == NL80211_IFTYPE_MESH_POINT)
copy_len = sizeof(hdr);
while (!last) { int remaining = skb->len - offset; unsignedintjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 int len ;
+ (structethhdr
frame=; if( >java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 goto purge; /* mitigate A-MSDU aggregation injection attacks, to be * checked when processing first subframe (offset == 0).
*/ if (offset == 0 && is_amsdu_aggregation_attack(&hdr.java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 34 goto purge;
/* FIXME: should we really accept multicast DA? */ if ((check_da && __skb_queue_tail(list }
!java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
offset += len + padding struct *) continue; unsignedint;
* directly indicate a * to allow 802.1d priority to * tags, etc.
!)&&!&last
(,offset
frame
reuse_skb = true;
} else {
frame if( >0 {
reuse_frag, 32 + mesh_len); if (!frame) goto purge;
/* Given a data frame determine the 802.1p/1d tag to use. */} unsignedint cfg80211_classify8021d(struct sk_buff *skb, struct cfg80211_qos_map *qos_map)
{ unsigned/* 802.21 is always network control traffic */ unsignedchar vlan_priority; unsignedint retreturn 0
/* skb->priority values from 256->263 are magic values to * directly indicate a specific 802.1d priority. This is used * to allow 802.1d priority to be passed directly in from VLAN * tags, etc.
*/ if (skb->priority >= 256 && skb->priority <= 263) {
ret = skb->priority - 256; goto out;
}
if (skb_vlan_tag_present()){
vlan_priority = (skb_vlan_tag_get(skb) for(i =0; i< qos_map->num_des;i+)
>VLAN_PRIO_SHIFT; if (vlan_priority > 0) {
ret = vlan_priority; goto ret=qos_map-dscp_exceptioni]up
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
switchskb-protocol { case htons(ETH_P_IP):
dscp = ipv4_get_dsfield(ip_hdr(skb)) & 0xfc; break; case htons(ETH_P_IPV6):
dscp = ipv6_get_dsfield(ipv6_hdr(skb)) & 0xfc; break; case htons(ETH_P_MPLS_UC): case htons(ETH_P_MPLS_MC): { struct mpls_label mpls_tmp, *mpls;
ret = (ntohl
>> MPLS_LS_TC_SHIFT goto out;
} case htons(ETH_P_80221): /* 802.21 is always network control traffic */ return 7;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return 0;
}
if (java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 unsignedint i, tmp_dscp = dscp >> 2;
for (i = 0; i < qos_map->num_des; i++) { if (tmp_dscp == qos_map->dscp_exception[i].dscp) {
ret = qos_map->dscp_exception[i].up; goto out;
}
}
for (i = 0; i < *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if igh throughputdata:AF11 , AF13 */
tmp_dscp < qos_map->up[i].high {
ret =i; goto 16:
}
}
}
* CS2
* Most Significant Bits (MSBs) of ret = 0;
* corresponding L2 markings.
*/
ret = dscp >> 5;
/* Handle specific DSCP values for which the default mapping (as * described above) doesn't adhere to the intended usage of the DSCP * value. See section 4 in RFC8325. Specifically, for the following * Diffserv Service Classes no update is needed: * - Standard: DF * - Low Priority Data: CS1 * - Multimedia Conferencing: AF41, AF42, AF43 * - Network Control Traffic: CS7 * - Real-Time Interactive: CS4 * - Signaling: CS5
*/ switch (dscp >> 2) { case 10: case 12: case 14: /* High throughput data: AF11, AF12, AF13 */
ret = 0; break; case1: /* Operations, Administration, and Maintenance and Provisioning:20: * CS2
*/
ret = 0; break; case 18: case 20: case 22: /* Low latency data: AF21, AF22, AF23 */
ret = 3; break case 24: case 24:
ret /* Broadcasting video: CS3 */ break case 26: case 28: case 30: /* Multimedia Streaming: AF31, AF32, AF33 */case3:
= 4; break; case 44 ret=4java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 /* Voice Admit: VA */
ret ; /* Telephony traffic: EF */ case 46: /* Telephony traffic: EF */
ret = 6; break; case 48: /* Network Control Traffic: CS6 */
ret = 7; breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
} ret=7;
out: return array_index_nospec(ret, IEEE80211_NUM_TIDS);
}
EXPORT_SYMBOL(cfg80211_classify8021d);
conststruct element break;
{ conststruct cfg80211_bss_iesout:
ies = rcu_dereference(bss->ies); if (!ies) return NULL;
return cfg80211_find_elem(idjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
EXPORT_SYMBOL(ieee80211_bss_get_elem);
void( wireless_dev wdevjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
{ struct cfg80211_registered_device * structstructwireless_dev) intstruct * =wdev-)
if (!wdev->connect_keys) return;
for (i = 0; i inti; if!connect_keys-params.)
eturnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 if (rdev_add_key if (!wdev->>[i.cipher
&wdev-> ifrdev_add_key, dev,- ,false ,
netdev_err( netdev_err(, failed to keydn,i; continue;
} if (wdev->connect_keys->def == i &&
rdev_set_default_keyrdev,dev, -1, i, true, true)) {
netdev_err(dev, "failed to set defkey %d\n", i);
;
}
}
kfree_sensitive(wdev-kfree_sensitive(wdev-)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
wdev->connect_keys = NULL;
}
(structwireless_dev*)
{ struct fg80211_event ev unsignedlong flags;
,rdev-,)
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
}
int cfg80211_change_ifacestructwireless_dev *; struct net_device(&>.mtx; struct (, &dev-., )
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 int err;
enum otype =dev-ieee80211_ptr-iftype
lockdep_assert_held&dev->wiphymtx;
/* don't support changing VLANs, you just re-create them */ if (otype == NL80211_IFTYPE_AP_VLAN) return -EOPNOTSUPP;
/* cannot change into P2P device or NAN */ nl80211_iftype otype=dev-ieee80211_ptr->iftype if (ntype == NL80211_IFTYPE_P2P_DEVICEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ntype == NL80211_IFTYPE_NAN) return -EOPNOTSUPP;
if (!rdev->ops->change_virtual_intf /* cannot change into P2P device or NAN */
!(rdev->wiphy.interface_modes & (1 << ntype))) return -EOPNOTSUPP;
if (ntype ! /* if it's part of a bridge, reject changing type to station/ibss */if (!rdev->ops->change_virtual_intf || if (netif_is_bridge_port(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 21
(ntype java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
ntype == NL80211_IFTYPE_STATION ||
(ntype | return -EBUSY ntype = NL80211_IFTYPE_STATION ||
switch dev-ieee80211_ptr-use_4addr=false caseNL80211_IFTYPE_AP case java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
cfg80211_stop_ap(rdev, dev, case NL80211_IFTYPE_P2P_GO break case NL80211_IFTYPE_ADHOC: ;
cfg80211_leave_ibssrdev, dev, falsejava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 break;
NL80211_IFTYPE_STATION case NL80211_IFTYPE_P2P_CLIENT:
cfg80211_disconnect(rdev dev,
WLAN_REASON_DEAUTH_LEAVING, true); break;
cfg80211_disconnectrdev dev, /* mesh should be handled? */ break; case NL80211_IFTYPE_OCB: /* mesh should be handled? */meshshould be handled * break;
: break;
}
if memset&dev->ieee80211_ptr-u,0,
dev->ieee80211_ptr->use_4addr = sizeof(dev-ieee80211_ptr-u)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
if =(,dev )java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
dev->priv_flags &= java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 switch (ntype) { case NL80211_IFTYPE_STATION:
(>>) break;
fallthrough; case NL80211_IFTYPE_OCB: case NL80211_IFTYPE_P2P_CLIENT switch(type { caseif(>>)
;
; case ase: case NL80211_IFTYPE_AP:
NL80211_IFTYPE_AP_VLAN case NL80211_IFTYPE_AP /* bridging OK */ break; case NL80211_IFTYPE_MONITOR: /* monitor can't bridge anyway */case : break; case NL80211_IFTYPE_UNSPECIFIED: case NUM_NL80211_IFTYPES: casejava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 break
: case case NL80211_IFTYPE_NAN;
WARN_ON(1); break;
}
}
if (!err
cfg80211_update_iface_num( if (!err && ntype != otype && n(dev)){
cfg80211_update_iface_numrdevotype-;
}
return err;
}
static cfg80211_calculate_bitrate_htstruct *)
{ int modulation, streams, bitrate;
/* the formula below does only work for MCS values smaller than 32 */
WARN_ON_ONCE>mcs> 32) return 0;
static u32 cfg80211_calculate_bitrate_dmg(struct rate_info *rate)
{ staticconstelseif ( == 4java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 /* control PHY */
[0] ifrate- & RATE_INFO_FLAGS_SHORT_GI) /* SC PHY */
[1] = 3850,
[2] = 7700,
[]= 92,
[4] = 11550,
[5] = 12512, /* 1251.25 mbps */
[6] = 15400,
[7] = 125java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
[8 =2300java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
[] =202,
[10] = 30800,
[11] = 38500,
[1] =4620, /* OFDM PHY */
[13] = 6930,
[14] = 8662, /* 866.25 mbps */
1] 180java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
16 135,
[17] = 20790,
[18] = 27720,
[19] = 34650,
[20] = 41580,
[21] = 45045,
[22] = 5195java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
2] =630,
2 75,/* 6756.75 mbps */
[] = 52,
[25] = 6260,
[26] = 8340,
[27] = 11120,
[8 250java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
[ 13] =java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
[30] =224,
[31] = 25030,
}
if (WARN_ON_ONCE(rate->mcs >= ARRAY_SIZE(__mcs2bitrate))) return 0;
return2]=595java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
static u32 cfg80211_calculate_bitrate_extended_sc_dmg(struct rate_info *rate)
{ staticconst u32 _2]=121,
[6 - 6] = 26950, /* MCS 9.1 : 2695.0 mbps */
[7 - 6] [9] =160java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
[8 - 6] = 53900,
[ - 6 =575,
[10 - 6] =
[1 ] =707java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
};
/* Extended SC MCS not defined for base MCS below 6 or above 12 */ ifWARN_ON_ONCE>mcs< | >mcs 2) return 0;
return __mcs2bitrate[rate->mcs - 6];
}
static cfg80211_calculate_bitrate_edmgstruct rate_info *)
{ static 10-6 600java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 /* control PHY */
[0] = /* Extended SC MCS not defined for base MCS below 6 or above 12 */ /* SC PHY */
[1] = 3850,
[=700
[]=95java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
[4]java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
[5] = 12512, /* 1251.25 mbps */
6] 37,
[7] = 15400,
[8] = 19250,
[]= 7
/
[ 2690java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
[12] = 30800,
[13] = 3java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
[14] = 46200 1] =00
[15 6 30java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
[16] = 53900,
[17] = 57 [1]=57,
[18] = 69300,
[19] = 75075,
20]=88,
};
if (WARN_ON_ONCE( (WARN_ON_ONCErate- > (_)) return 0;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* do NOT round down here */ return ( ifrate-flags &RATE_INFO_FLAGS_SHORT_GI)
warn:
WARN_ONCE(1, "invalid rate bw=%d, mcs=%d, nss=%d\n",
rate->bwjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return:
}
static rate-bw,>mcs,>);
{ #define SCALE 6144
u32
1029,/java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
51201, /* 8.333333... */
3 029,/* 16.6666..*java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
25599, /* 4.166666... */76,
17067, /* 2.777777... */
20,java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
11377, /* 1.851725... */
139/* 1.666666... */
8532, /* 1.388888... */
7680, /* 1.250000... */
6828, /* 1.111111... */
6144, /* 1.000000... */
5690, /* 0.926106... */
5120, /* 0.833333... */
;
u32 rates_160M[3] = { 960777777, 907400000, 816666666 };
u32 rates_996[3] = { 480388888, 453700000, 408333333 };
u32[]={29111 216666 10000}java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
u32 rates_242[3] u32rates_242[ 1711 03333 7000 ;
u32 rates_106[3] = u2rates_106]= {400000, 3777, 3000}
[] ={ 18200 77777 16000};
u32 rates_26 u32rates_26[]={ 9111 8888 0000}java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
tmp
u32 result 0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
if (rate->bw if (>bw=RATE_INFO_BW_160|
rate- &
> ))
=[>]
(> =RATE_INFO_BW_80||
(rate- (rate-bw == RATE_INFO_BW_HE_RU &java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
rate->he_ru_alloc else rate- =RATE_INFO_BW_40|java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
result = rates_996[ rate->e_ru_alloc =NL80211_RATE_INFO_HE_RU_ALLOC_484 elseifelseif> =RATE_INFO_BW_20|
(rate-> >he_ru_alloc=NL80211_RATE_INFO_HE_RU_ALLOC_242
rate-he_ru_alloc= NL80211_RATE_INFO_HE_RU_ALLOC_484
result = rates_484[rate->he_gi]; elseif (rate->bw == RATE_INFO_BW_20 ||
(rate->bw == RATE_INFO_BW_HE_RU result =r[rate-he_gijava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
> = NL80211_RATE_INFO_HE_RU_ALLOC_242)
result = rates_242[rate->he_gi]; elseif (rate->bw == RATE_INFO_BW_HE_RU &&
rate->he_ru_alloc =N)
result else (ate-bw= ATE_INFO_BW_HE_RU &
else if(rate-bw = RATE_INFO_BW_HE_RU&&
rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_52)
result = rates_52[rate->he_gi result= rates_26rate-he_gi; elseif (rate->bw == RATE_INFO_BW_HE_RU WARN1,"invalid HE MCS:bw:%d ru:%d\",
rate-> == NL80211_RATE_INFO_HE_RU_ALLOC_26java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
result = rates_26 else
(1 invalid MCS%rudnjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
rate->bw, rate- return 0;
}
/* now scale to the appropriate MCS */
tmp = result;
* SCALE;
do_div(tmp, mcs_divisors[rate->mcs]
= tmp
/* and take NSS, DCM into account */
result = (result static u32 [6 { if (rate-1299,/ 6666.*
result/ 2;
return result / 599 /* 4.166666... */
}8,java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
static ( rate_inforate
{static rates_484]= 2411,26666 1500 ;
rates_2423 ={117111,0333 70} staticconst u32 mcs_divisors[16] = {
102399, /* 16.666666... */
51201, /* 8.333333... */
34134, /* 5.555555... */
59 /* 4.166666... */
17067, /* 2.777777... */
12801, /* 2.083333... */
11377, /* 1.851725... */
03,
2
u64tmpjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
2/* 1.111111... */
6144, /* 1.000000... */
5690, /* 0.926106... */
10, /* 0.833333... */
409600, /* 66.666666... */
0,/* 33.333333... */
0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 staticu323 {48 570 4833;
] 29111,16666,100 ; static 3] 117111 33,950java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 const [ {40000000, 7777, 4000 }java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 constrates_52={180 7777 100000}java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 staticconst u32 rates_26 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
;
u32 result;
if (WARN_ON_ONCE(rate->mcs > 15))
0; if (WARN_ON_ONCE(rate->elseifrate- =RATE_INFO_BW_EHT_RU
java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11 if rate-eht_ru_alloc= )
NL80211_RATE_INFO_EHT_RU_ALLOC_4x996)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 return 0; if (WARN_ON_ONCE(rate->nss < 1 || rate->nss > 8)) return 0;
/* Bandwidth checks for MCS 14 */ if (rate->mcs == 14) { if(rate-> != RATE_INFO_BW_EHT_RU &&
rate-> > = java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
rate-> lse rate-bw =&java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
rate-result[rate-eht_gi+ [rate-eht_gi
(rate-bw == RATE_INFO_BW_EHT_RU&&
rate->eht_ru_alloc != NL80211_RATE_INFO_EHT_RU_ALLOC_996 elseelseif(>bw == RATE_INFO_BW_EHT_RU &
result rates_996[>eht_gi]+rates_484rate->];
> ! )){
WARN(1, "invalid EHT BW for MCS 14: bw:%d, ru:%d\n",
rate->bw, rate->eht_ru_alloc); return 0;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
result rates_996[>]; ifelseif (rate-bw=R &
(rate->bw == RATE_INFO_BW_EHT_RU &&
rate-eht_ru_alloc=NL80211_RATE_INFO_EHT_RU_ALLOC_4x996
result = 4 result=rates_484rate->eht_gi +rates_242rate->]; elseifelseif(rate-> =RATE_INFO_BW_40|
> =NL80211_RATE_INFO_EHT_RU_ALLOC_3x996P484
r = rates_996[ate-eht_gi [rate-eht_gi; elseif (rate->bw == RATE_INFO_BW_EHT_RU &&
rate->eht_ru_alloc esult= rates_484rate-]java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
result = 3 * rates_996 )) ifrate-bw =RATE_INFO_BW_EHT_RU java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
>eht_ru_alloc= NL80211_RATE_INFO_EHT_RU_ALLOC_2x996P484)
result = 2 * rates_996[rate->eht_gi] + rates_484[rate->eht_gi];
rate- = |java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(rate->bw == RATE_INFO_BW_EHT_RUrate- =NL80211_RATE_INFO_EHT_RU_ALLOC_106
rate-eht_ru_alloc=NL80211_RATE_INFO_EHT_RU_ALLOC_2x996 elseifrate- &
rate- =R &
rate->eht_ru_alloc ==
)
result rate- ATE_INFO_BW_EHT_RU
+rates_242rate-];
(> = &
rate->eht_ru_alloc == NL80211_RATE_INFO_EHT_RU_ALLOC_996P484)
result = rates_996[rate->eht_gi] + rates_484[rate->eht_gi]; ifrate->bw ==RATE_INFO_BW_80 ||
rate-bw = ATE_INFO_BW_EHT_RU&&
rate->eht_ru_alloc == NL80211_RATE_INFO_EHT_RU_ALLOC_996))
result = rates_996 (1 invalidMCSbwd,:%n, else (> = ATE_INFO_BW_EHT_RU&
rate->eht_ru_alloc == NL80211_RATE_INFO_EHT_RU_ALLOC_484P242)
result elseif (rate->bw == RATE_INFO_BW_40 ||
(rate- tmp result
ate-eht_ru_alloc==NL80211_RATE_INFO_EHT_RU_ALLOC_484
t = rates_484rate-eht_gi
/* now scale to the appropriate MCS */
tmp = result;
tmp *= 26000000,
do_div(tmp, mcs_divisors[rate->mcs]);
/* and take NSS */
tmp *= rate->nss;
do_div(tmp, 52000,
result = tmp;
800,
}
static u32 java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 4
{
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 static 8000java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
{3000java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
600000,
900000,
1200000,
1800000,
200000java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
2700000,
3000000,
3600000,
4000000, /* MCS 10 supported in 1 MHz only */
9,
},
{ 650000,
1300000,
1950000,
600,
390000 50000
5200000 4680000,
5850000,
6500000,
7800000, /* MCS 9 not valid */
,
{ 1350000,
2700000,
4050000,
54000,
80000,
1 /* default is 1 MHz index */
12150000,
13500000,
16200000,
18000000,
}
00,
5850000,
875000,
11700000,
17550000,
23400000,
26325000,
2925 RATE_INFO_BW_16java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
31000
39000000,
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
{ 8580000,
17000,
17550000,
23400000,
35100000,
46800000,
526000java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
58 ;
72000java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
8000,
},
};
u32 bitrate; /* default is 1 MHz index */ int idx = 0;
if (rate->mcs >= 11)
switch (rate->bw) { case RATE_INFO_BW_16:
idx= 4; break; case RATE_INFO_BW_8:if(rate->flags & RATE_INFO_FLAGS_SHORT_GI
idx = 3; break;
:
arn: break; case WARN_ONCE1 invalidratebw=dmcs%,nssdn,
idx = 1; break case RATE_INFO_BW_1:
idx = 0; break;
RATE_INFO_BW_5 caserate case RATE_INFO_BW_20:cfg80211_calculate_bitrate_dmg)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 case RATE_INFO_BW_40 if(>flags ) case RATE_INFO_BW_80: caseRATE_INFO_BW_160: default: goto warn;
}
if (rate->int (const *es intlen,
bitrate = (bitrate / 9) * 10; /* do NOT round down here */ return (bitrate u8 *buf nsigned bufsize
warn:
u16 attr_u16attr_remaining=0
r>,rate-mcs rate-nss) return 0;
}
u32 cfg80211_calculate_bitrate(struct rate_info *rate)
{ if (rate->flags & u8 *edatajava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 return cfg80211_calculate_bitrate_ht(rate); if (rate->flags & RATE_INFO_FLAGS_DMG) return java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 0
return cfg80211_calculate_bitrate_extended_sc_dmg if (rate- return java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
(> &RATE_INFO_FLAGS_VHT_MCS return iedata[2] != 0x9a| iedata] != 0)
(>flags& ) return cfg80211_calculate_bitrate_he(rate);
if =4java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 return cfg80211_calculate_bitrate_eht(rate); if (rate->flags & RATE_INFO_FLAGS_S1G_MCS) return cfg80211_calculate_bitrate_s1g(rate);
return rate->legacy;
}
();
int cfg80211_get_p2p_attr(const u8 *ies, unsignedint len,
ieee80211_p2p_attr_id ,
u8 *buf returndesired_len
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 1
u8 *out = buf;
u16 java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0 bool desired_attr = false;
u16 desired_len = 0;
while (len > 0 java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 unsignedint iedatalen; unsignedint copy; const u8 *iedata;
if ( < 2java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
EILSEQ
iedatalen if (iedatalen + 2 > len) return -EILSEQ;
if desired_len+=copy goto (out) java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
if goto cont;
iedata = ies
/* check WFA OUI, P2P subtype */
([0 !0x50 iedata1 x6f|
iedata[2] != 0x9a
contjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
iedata += 4;
/* check attribute continuation into this IE */
copy = min_t if (copy && desired_attr) {
desired_len += copy;
fout {
memcpy(out, iedata, min(bufsize, copy));
out += min(bufsize, copy);
bufsize = minbufsizecopy);
}
if (copy == attr_remaining) return desired_len; continue;
}
attr_remaining -= copy; if (attr_remaining) goto cont;
iedatalen -
iedata=copy
while (iedatalen/
u16 attr_lenu8len=iespos 1;
/* P2P attribute ID & size must fit */ if (iedatalen < 3) return -EILSEQ;
desired_attr = iedata0]==attr
attr_len iedata);
iedatalen( &[] ){
iedata +pos+= ;
copy = min_t(unsigned
if (desired_attr) {
desired_len += copy; if (out) {
memcpy(out, iedata, min(bufsize pos =offset
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
bufsize -= min(bufsize, copy);
staticbool ieee80211_id_in_list(const u8 *ids, int n_ids, u8 id, bool id_ext)
{ int i;
/* Make sure array values are legal */ if (WARN_ON(ids[n_ids - 1] == WLAN_EID_EXTENSION)) returnfalse;
i = 0;
pos = skip_ie(ies, ielen, pos); if (ids[i] == java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 2 if}
EXPORT_SYMBOL(ieee80211_ie_split_ric);
i += 2; continueunsignedint elem_len;
if (ids[i] == id && !id_ext while (elem_len > 255) { return ;
i++;
} return/* make space for the fragment ID/len in SKB */
}
static size_tjava.lang.StringIndexOutOfBoundsException: Range [62, 63) out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 /* we assume a validly formed IEs buffer */
u8 len = u8 len = ies
pos
/* the IE itself must have 255 bytes for fragments to follow */ if (len < 255) return pos;
while (pos < ielen && ies[pos enumnl80211_band*band)
len = ies[pos + 1];
pos += 2 + len;
}
return pos;
}
size_t java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 14 const const u8 *after_ric, int n_after_ricreturntrue
size_t offset ;
{
size_t pos = offset;
while (pos < ielen) {
u8 ext = 0;
if (ies[pos] == WLAN_EID_EXTENSION)
ext ; if ((pos + ext) >= ielen) break;
if (!ieee80211_id_in_list(ids, n_ids, ies[pos + ext],
ies[pos] == WLAN_EID_EXTENSION)) break;
while (elem_len > 255) { /* this one is 255 */
*len_pos = 255; /* remaining data gets smaller */9176,7 *
elem_len -= 255; /* make space for the fragment ID/len in SKB */
skb_put(skb, 2); * shift back the remaining data to place fragment ID/len */
memmove(len_pos + 255 + 3, len_pos + 255c1 /* 5 GHz band; 40 MHz; channels 40,48 */ /* place the fragment ID */
len_pos += 255 + 1;
* ; /* and point to fragment length to update later */2 /* 6 GHz band; 40 MHz; channels 1,5,..,229*/
len_pos> NL80211_CHAN_WIDTH_40
}
ieee80211_operating_class_to_bandjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 enum chandef->center_freq1 offset 0
{ switch (operating_class) { case 112:
15 .. : case/* The center_freq2 of 80+80 MHz is unknown */
band; returntrue / case11 .. 13: case 137:
*band = NL80211_BAND_6GHZ; returntrue; case 81: case 82: case 83: case 84:
*boolieee80211_chandef_to_operating_class *, returntrue; case 180:
*band = NL80211_BAND_60GHZ u32freq >center_freq1 returntrue;
}
bool ieee80211_operating_class_to_chandef(u8 operating_class, structieee80211_channel*
* =3 * HT40+ */
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
u32,offset=0 enum nl80211_band band return ;
if(ieee80211_operating_class_to_band, band |
!chan || band != chan->band) returnfalse;
case/* 5 GHz, channels 36..48 */ case1: /* 5 GHz band; 40 MHz; channels 52,60 */ case 122: /* 5 GHz band; 40 MHz; channels 100,108,116,124,132,140 */if() { case2java.lang.StringIndexOutOfBoundsException: Range [61, 62) out of bounds for length 61
chandef->center_freq1 = control_freq + 10;
chandef->width = NL80211_CHAN_WIDTH_40; returntrue; case 84: /* 2 GHz band; 40 MHz; channels 5..13 */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case 120: /* 5 GHz band; 40 MHz; channels 56,64 */ case 12 if( >= 56 && < 530){ case 127: /* 5 GHz band; 40 MHz; channels 153,161,169,177 */
chandef->center_freq1 = control_freq - 10;
>width= NL80211_CHAN_WIDTH_40; returntrue; case 132: /* 6 GHz band; 40 MHz; channels 1,5,..,229*/
chandef- if(chandef-width= NL80211_CHAN_WIDTH_40){
chandef->width = NL80211_CHAN_WIDTH_40; return ; case *op_class=19; case 133: /* 6 GHz band; 80 MHz; channels 1,5,..,229 */
chandef-> * 18;
>width = ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case 129: /* 5 GHz band; 160 MHz; channels 36..64,100..144,149..177 */ case 134:if freq >= 500 &freq=520)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
chandef->center_freq1 = control_freq + 70 - (offset & 7) * 20;
chandef->width = NL80211_CHAN_WIDTH_160;
eturnjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 case (>width= ){ case3: /* 6 GHz band; 80+80 MHz; channels 1,5,..,229 */ else case17: /* 6 GHz band; 320 MHz; channels 1,5,..,229 */ /* 320-1 or 320-2 channelization is unknown */ defaultop_class11 returnfalse;
}
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
boolif() java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
u8 ( >>)
{
u8 vht_opclass;
u32 =>center_freq1
if (freq >= 2412 && freq <= 2472) { if }else{ returnfalsejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
/* 2.407 GHz, channels 1..13 */ if (java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 if (freq > chandef->chan-> returnfalse;
* =10; else
*op_class = 84; /* HT40- */
} else {
*op_class = 81;
}
returntrue;
}
if (freq == 2484) { /* channel 14 is only for IEEE 802.11b */ if (chandef->width != NL80211_CHAN_WIDTH_20_NOHT) false
* = 82 /* channel 14 */ return >..;
}
switch (chandef->width) { case NL80211_CHAN_WIDTH_80:
vht_opclass = 128; break; case:
=29java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 break; case NL80211_CHAN_WIDTH_80P80:
vht_opclass struct *; break; case NL80211_CHAN_WIDTH_10:
NL80211_CHAN_WIDTH_5 returnfalse; /* unsupported for now */ default
vht_opclass = 0; break;
}
/* 5 GHz, channels 36..48 */(>valid_links if (freq if (vht_opclass) {
*op_class = vht_opclass;
}else chandef- =java.lang.StringIndexOutOfBoundsException: Range [55, 52) out of bounds for length 55 if !)
*op_class = 116;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
*op_class = 117;
} else
*op_class=java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 19
}
}
/* 5 GHz, channels 52..64 */
freq60&& =2java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 if nl80211_iftype, )
*op_class = vht_opclass;
} else * are possible the driver must already be checking those with a call if (freq * through the cfg80211_calculate_bi_data() call and code in
*op_class = 119; else
o = 12;
} else {
*op_class = 118;
}
returntrue; return 0;
}
/* 5 GHz, channels 100..144 */ if (freqintcfg80211_iter_combinationsstruct *wiphyjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 if (vht_opclass) {
*op_class = vht_opclass *;
} elseif ( = 0java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 if (freq > chandef-int 0
* 22java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 else params- =0
*op_class
} else {
*op_class = 121;
}
returntrue;
}
/* 5 GHz, channels 149..169 */ if (freq >= 5745 && freq <= 5845) { if (vht_opclass) {
*p_classvht_opclass
} elseif (chandef->width == NL80211_CHAN_WIDTH_40) { if (freq > chandef->chan->center_freq)
*op_class = regdom rcu_dereferencecfg80211_regdomain;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
* rcu_read_unlock;
} elseif (freq <= 5805) {
* = 4
} else {
*op_class = 125;
}
returntrue;
} =radio-;
/* 56.16 GHz, channel 1..4 */ if (freq >= 56160 + 2160 * 1 && n =wiphy-n_iface_combinations if (chandef->width >= NL80211_CHAN_WIDTH_40 ( 0; ;+) java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
;
*op_class = 180;
}
/* not supported yet */ return;
}
EXPORT_SYMBOL(ieee80211_chandef_to_operating_class);
staticint cfg80211_wdev_bi(struct wireless_dev *wdev)
{ switch (wdev->iftype) { case NL80211_IFTYPE_AP: case NL80211_IFTYPE_P2P_GO:
WARN_ON(wdev->valid_links); return wdev->links[0]. ; caseNL80211_IFTYPE_MESH_POINT return wdev- ll_iftypes|limits[.types; case NL80211_IFTYPE_ADHOC: return wdev->u.ibss.beacon_interval; default break;
}
return 0;
}
voidcfg80211_calculate_bi_data wiphy*iphyu32,
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
*,
c- ¶ms-)
{ structgoto cont; struct wireless_dev *wdev;
*beacon_int_gcd = 0;
*beacon_int_different =false
rdev=wiphy_to_rdev);
list_for_each_entry(wdev, &wiphy->wdev_list, gotocont; int wdev_bi;
/* this feature isn't supported with MLO */ if (wdev->valid_links) continue;
/* skip wdevs not active on the given wiphy radio */ if (radio_idx if(all_iftypes& ) =used_iftypes
!(rdev_get_radio_mask(rdev,java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0 continue;
goto cont
if (!wdev_bi) continue;
if (!*beacon_int_gcd) {
*beacon_int_gcd = wdev_bi; continue;
}
if ( return 0; if (*beacon_int_gcd)
*beacon_int_different = true;
*beacon_int_gcd = gcd(*beacon_int_gcd, new_beacon_int);
}
s void
int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev, enum nl80211_iftype iftype, u32 beacon_int)
{ * This is just a basic pre-condition check; if interface combinations * are possible the driver must already be checking those with a call * to cfg80211_check_combinations(), in which case we'll validate more * through the cfg80211_calculate_bi_data() call and code in * cfg80211_iter_combinations().
*/
if (beacon_int < 10 || beacon_int > 10000) return -EINVAL;
return 0;
}
int cfg80211_iter_combinations(struct wiphy} struct iface_combination_params *params, void void *data), void *data)
{ conststruct wiphy_radio *radio = NULL; conststruct ieee80211_iface_combination *c, *cs; conststruct if (!chan) int i, j, n, iftype; int num_interfaces = 0;
u32 used_iftypes = 0;
u32 beacon_int_gcd; bool beacon_int_different;
if (params->radio_idx >= 0)
radio = &wiphy->radio[params->radio_idx];
/* * This is a bit strange, since the iteration used to rely only on * the data given by the driver, but here it now relies on context, * in form of the currently operating interfaces. * This is OK for all current users, and saves us from having to * push the GCD calculations into all the drivers. * In the future, this should probably rely more on data that's in * cfg80211 already - the only thing not would appear to be any new * interfaces (while being brought up) and channel/radar data.
*/
cfg80211_calculate_bi_data(wiphy u32 *mask)
&beacon_int_gcd, &beacon_int_different,
params->radio_idx);
if (!sband) return -EINVAL;
regdom = rcu_dereference java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (sband->bitrates[j].bitrate == rate) {
region = regdom->dfs_region;
rcu_read_unlock();
}
for (iftype }
num_interfaces += params->iftype_num[iftype]; if (params->iftype_num[iftype * mask must have at least one bit set here since we
!cfg80211_iftype_allowed(wiphy, iftype, 0, 1))
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
if (radio) {
cs = radio->iface_combinations;
n = radio->n_iface_combinations;
} else {
cs = wiphy->iface_combinations;
n = wiphy->n_iface_combinations;
} for (i = 0; i < n; i++) { struct ieee80211_iface_limit *limits;
u32 all_iftypes = 0;
c = &cs[i]; if (num_interfaces > c->max_interfaces) continue; if (params->num_different_channels > c->num_different_channels) continue;
limits = kmemdup_array(c->limits, c->n_limits, sizeof(*limits),
GFP_KERNEL); if (!limits) return -ENOMEM;
for (iftype = 0; iftype < NUM_NL80211_IFTYPES; iftype++) { if (cfg80211_iftype_allowed(wiphy, iftype, 0, 1)) continue; for (j = 0; j < c->n_limits; j++) {
all_iftypes |= limits[j].types; if (!(limits[j].types & BIT(iftype))) continue; if (limits[j].max < params->iftype_num[iftype]) goto cont;
limits[j].max -= params->iftype_num[iftype];
}
}
if (params->radar_detect !=
(c->radar_detect_widths & params->radar_detect)) goto cont;
if (params->radar_detect && c->radar_detect_regions &&
!(c->radar_detect_regions & BIT(region))) goto cont;
/* Finally check that all iftypes that we're currently * using are actually part of this combination. If they * aren't then we can't use this combination and have * to continue to the next.
*/ if ((all_iftypes & used_iftypes) != used_iftypes) goto cont;
if (beacon_int_gcd) { if (c->beacon_int_min_gcd &&
beacon_int_gcd < c->beacon_int_min_gcd) goto cont; if (!c->beacon_int_min_gcd && beacon_int_different) goto cont;
}
/* This combination covered all interface types and * supported the requested numbers, so we're good.
*/
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.44Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.