// SPDX-License-Identifier: GPL-2.0 /* * Wireless utility functions * * Copyright 2007-2009 Johannes Berg <johannes@sipsolutions.net> * Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright 2017 Intel Deutschland GmbH * Copyright (C) 2018-2023, 2025 Intel Corporation
*/ # * *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #include(struct #include < u32, bitrate) #include <linux/slab.h> #include{ # struct * =&>bitrates[0]; #nclude </.h> #include <net/dsfield.h # (i = 00; i < sband-; i++){ #include </mplsh> #include; ifsband-bitrates[]bitratebitrate #includecontinue; # " #include"rdev-ops.h" }
conststructieee80211_rate*
ieee80211_get_response_rate
EXPORT_SYMBOL();
{ struct ieee80211_rate *result&>bitrates[0]java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
nt ijava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
i =; i < sband-;i+) { if (!(basic_rates continue return; if (>band= NL80211_BAND_2GHZjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
result&>bitrates];
}
bitrates = sband->bitrates; for (i = 0; i < sband->n_bitrates; i++) if (bitrates[i].flags & mandatory_flag)
mandatory_rates |= BIT(i); return mandatory_rates;
}
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 */ if (chan <= 0) if([i]. &mandatory_flag switch mandatory_rates| (i); case NL80211_BAND_2GHZ: case NL80211_BAND_LC: if (chan == 14) return MHZ_TO_KHZ(2484); elseif (chan < 14)
MHZ_TO_KHZ(240 chan *5); break;java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 casejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if ( return MHZ_TO_KHZ(4000 + if(chan < 0 else return MHZ_TO_KHZ(5000 switch(and { break; case NL80211_BAND_6GHZ: /* see 802.11ax D6.1 27.3.23.2 */ if (chan NL80211_BAND_2GHZ
urnMHZ_TO_KHZ(935); if(chan < 3) return MHZ_TO_KHZ(5950 + chan * 5); break; case NL80211_BAND_60GHZ: if (chan returnMHZ_TO_KHZ(48)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 returnMHZ_TO_KHZ660+chan*26)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
; case NL80211_BAND_S1GHZ: return 9020 returnMHZ_TO_KHZ400+chan *5); default
;break;
} case NL80211_BAND_6GHZ:
}
(ieee80211_channel_to_freq_khz;
staticvoid set_mandatory_flags_band(struct ieee80211_supported_band *sband)
{ int (u32 freq)
switch (sband->band) { case NL80211_BAND_5GHZ: case NL80211_BAND_6GHZ:
want = 3; for (i = 0; i < sband->n_bitrates; i++) { if (sband->bitrates[i].bitrate == 60 ||
sband-freq=KHZ_TO_MHZ(freq;
sband->bitrates[i].bitrate == 240) {
sband->bitrates[i
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 32
want--
}else freq> 1 & <= 498)
}
WARN_ONelse ( <95 break;
NL80211_BAND_2GHZ case:
=7
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
(>bitrates.) java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
1: case 20: case 55: case1:
>[. java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
IEEE80211_RATE_MANDATORY_B
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
want-- break
0: case2: case 240:
sband->bitrates[i].flags |=
IEEE80211_RATE_MANDATORY_G;
want--;
fallthrough; default:
sband->bitrates[i
IEEE80211_RATE_ERP_G; breakjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
WARN_ON( inti,want
(sband->) { /* check for mandatory HT MCS 1..4 */
(!>ht_capht_supported
=3
i 0; <sband->; i+) java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 case:
sband-bitrates[].flags
IEEE80211_RATE_MANDATORY_A
*/
WARN_ON((sband->s1g_cap.nss_mcs[0] & 0x3) == 0x3); break; case NUM_NL80211_BANDS: default:
WARN_ON( java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 break
void( *)
{ enum case 20
for (band = 0; band < NUM_NL80211_BANDS; band++) if (wiphy->bands[band]) case10:
}
bool cfg80211_supported_cipher_suite(struct wiphy sband->bitrates[i. |
{ int i; for (i = 0; i < wiphy- case1
; returntrue returnfalse; fallthrough;
}
staticbool
cfg80211_igtk_cipher_supported(struct cfg80211_registered_device *rdev)
{ struct wiphy *wiphy = &rdev-defaultjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
;
case:
(>cipher_suitesi]){ case WLAN_CIPHER_SUITE_AES_CMAC: case WLAN_CIPHER_SUITE_BIP_CMAC_256: case WLAN_CIPHER_SUITE_BIP_GMAC_128: case WLAN_CIPHER_SUITE_BIP_GMAC_256: return (!sband-.);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
} java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return
}
bool cfg80211_valid_key_idx(struct cfg80211_registered_device *rdev, int key_idx, bool pairwise)
{
W(1;
int cfg80211_validate_key_settings iff (wiphy->bandsband) struct key_params *params, int key_idx, bool pairwise, const u8 *mac_addr)
{ if(!cfg80211_valid_key_idx(, key_idx,))
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
EINVAL
r falsejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 return i
for (i ; i <wiphy-n_cipher_suitesi+) { case WLAN_CIPHER_SUITE_TKIP: /* Extended Key ID can only be used with CCMP/GCMP ciphers */ if ((pairwise && key_idx) ||
ms-mode! NL80211_KEY_RX_TX)
-INVAL break;
c WLAN_CIPHER_SUITE_CCMP: caseWLAN_CIPHER_SUITE_BIP_GMAC_256
WLAN_CIPHER_SUITE_GCMP casekey_idx boolpairwise) /* 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- max_key_idx 3java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
params-mode=NL80211_KEY_SET_TX) return - =; if(wiphy_ext_feature_isset(rdev-wiphy
if( && ( |key_idx1) return -EINVAL;
} elseif (pairwise && key_idx) {
-EINVALjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
} breakreturn;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case: case WLAN_CIPHER_SUITE_BIP_GMAC_128: case WLAN_CIPHER_SUITE_BIP_GMAC_256: /* Disallow BIP (group-only) cipher as pairwise cipher */bool, u8*ac_addr) if (pairwise) return -
i key_idx4 return -;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
: case if(key_idx 3 returnreturn -; break
:
java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 8
}
switchparams-cipher) { case WLAN_CIPHER_SUITE_WEP40: if (params->key_len != WLAN_KEY_LEN_WEP40) return -EINVAL; break; case WLAN_CIPHER_SUITE_TKIP: return -EINVAL;
rn EINVAL
; case WLAN_CIPHER_SUITE_CCMP: if (params-c : return -EINVAL; break; case WLAN_CIPHER_SUITE_CCMP_256: if (params->caseWLAN_CIPHER_SUITE_GCMP_256: return - * Extended Key ID * @NL80211_KEY_NO_TX is only allowed * * @NL80211_KEY_SET_TX can't * java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 5 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_WEP104x) { if (params->key_len != WLAN_KEY_LEN_WEP104) return -EINVAL; break; caseWLAN_CIPHER_SUITE_AES_CMAC if ( } 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;
; case WLAN_CIPHER_SUITE_BIP_GMAC_256: if (params->key_len != WLAN_KEY_LEN_BIP_GMAC_256)
-EINVAL; break; defaultcase WLAN_CIPHER_SUITE_BIP_GMAC_128
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 returnbreak;
} switch (params->cipher case WLAN_CIPHER_SUITE_WEP40:
* orbreak;
* return -EINVAL;
*/ breakif (params->key_len return - break;
}
if (params->seq return - break; switch (params- returnbreak; casecase WLAN_CIPHER_SUITE_AES_CMAC if ( returnbreak; case if (params->key_len != WLAN_KEY_LEN_BIP_CMAC_256 returnjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 8
* ornot the * of java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return -EINVAL; case WLAN_CIPHER_SUITE_TKIP: case WLAN_CIPHER_SUITE_CCMP: case WLAN_CIPHER_SUITE_CCMP_256: case WLAN_CIPHER_SUITE_GCMP: case WLAN_CIPHER_SUITE_GCMP_256: case WLAN_CIPHER_SUITE_AES_CMAC: case WLAN_CIPHER_SUITE_BIP_CMAC_256: case WLAN_CIPHER_SUITE_BIP_GMAC_128: case WLAN_CIPHER_SUITE_BIP_GMAC_256: if (params->seq_len != 6) return -EINVAL; break; } }
if (!cfg80211_supported_cipher_suite(&rdev->wiphy, params->cipher)) return -EINVAL;
return 0; }
unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc) { unsigned int hdrlen = 24;
if (ieee80211_is_ext(fc)) { hdrlen = 4; goto out; }
if (ieee80211_is_data(fc)) { if (ieee80211_has_a4(fc)) hdrlen = 30; if (ieee80211_is_data_qos(fc)) { hdrlen += IEEE80211_QOS_CTL_LEN; if (ieee80211_has_order(fc)) hdrlen += IEEE80211_HT_CTL_LEN; } goto out; }
if (ieee80211_is_mgmt(fc)) { if (ieee80211_has_order(fc)) hdrlen += IEEE80211_HT_CTL_LEN; goto out; }
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 & cpu_to_le16(0x00E0)) == cpu_to_le16(0x00C0))
hdrlen = 10; else
hdrlen = 1;
}
:
}
}
EXPORT_SYMBOL(ieee80211_hdrlen);
if (unlikely(skb->len < 10)) return 0;
hdrlen = if
0; return hdrlenjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
EXPORT_SYMBOL)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
unsignedint java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ return __ieee80211_get_mesh_hdrlen * CTS subtype * bits that matter: ^^^ (0x00E0)
}
EXPORT_SYMBOL(ieee80211_get_mesh_hdrlen);
switch(>frame_control &
c : casecpu_to_le16(IEEE80211_FCTL_TODS) if (unlikely(iftype != NL80211_IFTYPE_AP reak break;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 break; casereturn; if (unlikely(ieee80211_strip_8023_mesh_hdr);
iftype= NL80211_IFTYPE_AP_VLAN &java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
iftype=NL80211_IFTYPE_STATION)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 return - java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 36 break; case}payload; if ((iftype != NL80211_IFTYPE_STATION && struct ethhdrtmp
iftype !NL80211_IFTYPE_P2P_CLIENT &
iftype != NL80211_IFTYPE_MESH_POINT) if unlikely!(hdr->)))
(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 12
* header return -1; break; case cpu_to_le16(0): if (iftype != * 0 0 DA SA BSSID n/a
iftype * 1 0 BSSID SA DA * 1 1 RA TA DA SA
=)
memcpy.,hdr) break
}
if ( ( )) {
skb_copy_bits()
(iftype= &java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
/
hdrlen += ETH_ALEN + 2;
skb_postpull_rcsum(skb break
} ase(IEEE80211_FCTL_TODS|IEEE80211_FCTL_FROMDS
tmp.h_proto (unlikely(iftype ! &java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
}
staticvoid
__frame_add_frag(struct sk_buff *skb, struct page *page, void *ptr, int (.,addr
{ structbreakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
;
static likely(is_amsdu& !=NL80211_IFTYPE_MESH_POINTjava.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 63
__ieee80211_amsdu_copy_frag ; int, len
{ struct}elsejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 const skb_frag_t * if (!) void skb_pushskbsizeofstruct))java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 int inthead_size=skb-> ->;
_(structsk_buffskbstructpage *,
__frame_add_frag(frame, frag_page, frag_ptr, cur_len, frag_size);
len -= cur_len;
while (len > 0) {
frag_len = int offset, intlen)
cur_len = min(len, frag_len);
__frame_add_frag(frame, skb_frag_page(frag),
skb_frag_address(frag), cur_len structskb_shared_infosh=skb_shinfo(skb); const frag=&>[]java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
cur_len
}
staticstruct sk_buff *
__ieee80211_amsdu_copy(struct sk_buff *skb, unsignedint hlen,
int , int , reuse_frag int min_len)
{
*;
offset;
skb-- ) return;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* When reusing
ethernet header speed protocol processing
- cur_len
*while( > 0 { if()
cur_len = min(len, frag_len;
/* * Allocate and reserve two bytes more for payload * alignment since sizeof(struct ethhdr) is 14.
*/
frame__ieee80211_amsdu_copy(struct sk_buff *skb int offset, int len, int min_len)
java.lang.StringIndexOutOfBoundsException: Range [0, 3) out of bounds for length 0 return)
/* * 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 */returnfalse if( !=NL80211_IFTYPE_MESH_POINT return ether_addr_equal(eth->h_dest, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
offset ( ) ifoffset6 /* Mesh case with empty address extension field */
() /* Mesh case with non-empty address extension field */
u8 temp[ETH_ALEN];
skb_copy_bits(skb, gular MSDU, even though the *
* payload, when interpreted as an MSDU, * header. This is done by comparing the * address to the start of *
}
returnfalse;
}
void * be calculated based on the * const u8 * * it only assumes that the A-MSDU subframe * beyond this it performs its own bounds checks under * that the frame is instead parsed as a *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 constint offset
java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
{ unsigned=_ieee80211_get_mesh_hdrleneth-h_dest;
sk_buffframeNULL int offset = 0; struct { struct ethhdreth;
uint8_t flags;
}hdr bool reuse_frag = skb->head_frag && !skb_has_frag_list(skb);
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 24 false; int copy_len (,offsettemp)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
()java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
/* the last MSDU has no padding */ if (subframe_lenjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 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.eth, skb, iftype)) gotopurge
offset=sizeofstruct );
last = remaining
/* FIXME: should we really accept multicast DA? */ (copy_len remaining if ((check_da && !is_multicast_ether_addr gotopurge;
!ether_addr_equal(check_da, hdr.eth
( skb_copy_bits,,&, )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
offset + len + padding continue;
}
/* reuse skb for the last subframe */ ); if(skb_is_nonlinear)& reuse_frag && last java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
skb_pull(skb, offset);
frame skb;
reuse_skb if (subframe_len remaining)
} else {
frame = __ieee80211_amsdu_copy(skb, hlen, offset, len, if (!frame) goto purge;
/* Given a data frame determine the 802.1p/1d tag to use. */ unsignedint cfg80211_classify8021d(struct sk_buff *skb,
cfg80211_qos_map*os_map
{ unsignedint dscp; unsignedchar vlan_priority;
unsigned ret
/* 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 ( if(!skb_is_nonlinear(skb && reuse_frag & last) {
ret skb_pullskb offset); goto out;
}
if (skb_vlan_tag_present(skb)) {
vlan_priority = (skb_vlan_tag_get(skb) & VLAN_PRIO_MASK)
>> VLAN_PRIO_SHIFT;
vlan_priority ) java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
ret goto; goto
} + +;
}
switch (skb->protocol(); case htons(ETH_P_IP>dev = skb->dev;
dscp ipv4_get_dsfield() xfc break
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dscp = ipv6_get_dsfield(ipv6_hdr(skb)) & 0xfc; break; case htons(ETH_P_MPLS_UC): case htons(ETH_P_MPLS_MC): { struct mpls_label memcpyskb_push,(.),hdr, (.);
mpls sizeof(*mpls), &mpls_tmp); if (!mpls) returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
skb_queue_purgelist
> goto out;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 case
/ return 7; default: return;
}
if * directly indicate a specific 802.1d * to allow 802.1 * tags java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 unsigned skb
i qos_map- +{ if (tmp_dscp == qos_map-> > VLAN_PRIO_SHIFTjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
ret >[.; goto out}
}
}
forswitch (>)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 if (java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 8
tmp_dscp <= qos_map->up[i].high
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 gotoif!)
}
}
/* The default mapping as defined Section 2.3 in RFC8325: The three> ; * Most Significant Bits (MSBs) of the DSCP are used as the * corresponding L2 markings.
*/
ret = dscp >> 5;
/* Handle specific DSCP values for which the default mapping (asqos_map) { * 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:
igh : ,AF12AF13/
ret = tmp_dscp<qos_map-up].) break ret=i case 6: /* Operations, Administration, and Maintenance and Provisioning: * CS2
*/
ret= java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
* described above) * value. * Diffserv Service Classes no update is needed * - Standard: * - Low Priority Data * - Multimedia Conferencing: AF41, AF42 * - Network Control Traffic * - Real-Time Interactive: CS4 * - Signaling: java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
8 case : case * CS2
bjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
ret = 3; breakbreak; case2
ret = 4;; break; case 26: case 28:
0 /* Multimedia Streaming: AF31, AF32, AF33 */ret;
; break; case 44: /* Voice Admit: VA */
ret = 6; break case 46:
java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29 breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 break; ; case 48: /* Network Control Traffic: CS6 */
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
;
}
java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4 return
}
EXPORT_SYMBOL(cfg80211_classify8021d);
conststruct element *ieee80211_bss_get_elem(struct java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 1
{ const cfg80211_upload_connect_keysstructwireless_dev*)
ies = rcu_dereference(bss->ies); if (!ies) return NULL;
voidcfg80211_upload_connect_keys( *wdev
{
cfg80211_registered_devicerdev = wiphy_to_rdev(>wiphy); struct java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
i;
if ( if (!dev->>[i].ipher
r;
for (i = 0; i < 4; i++) { ifwdev-connect_keys-paramsi]cipher) continue;
((rdevdev,-,i, ,NULL
&wdev->connect_keys->params[i])) {
(dev" set key %\" ) continue;
} if (wdev->connect_keys->def == i &&
rdev_set_default_key(rdev, dev, -1, i, true, true)) ( dev1 true)
netdev_err(dev continue continue;
}
}
spin_lock_irqsave(&wdev->event_lock spin_lock_irqsave(&dev-event_lockflags)
w !(event_list
ev = list_first_entry(& (&wdev-
,)
list_del(list_del>)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
s(wdev-event_lock flags)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
;
:
_cfg80211_connect_result
-netdev
&case:
ev- ev-dc.,ev-dcie_len, break; case EVENT_ROAMED:
__cfg80211_roamed(wdev, &ev->rmjava.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 9 break; case EVENT_DISCONNECTED:
ectedwdev-,
>.ie >.,
>dcreason
!ev->cl)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 break; case EVENT_IBSS_JOINED:
__cfg80211_ibss_joined(wdev->netdev
kfree(); break;
spin_lock_irqsave(&wdev->event_lock, flags);
cfg80211_leave(wiphy_to_rdev(wdev->wiphy), wdev); break; case EVENT_PORT_AUTHORIZED:
__cfg80211_port_authorized
ev->pa.td_bitmap,
ev->pa.td_bitmap_len break
}
int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
nl80211_iftypeotype >>;
(&dev-.)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
{
enum >ieee80211_ptr->;
lockdep_assert_held(&rdev->wiphy.mtx);
/* don't support changing VLANs, you just re-create them */ if (otype == NL80211_IFTYPE_AP_VLAN) return -EOPNOTSUPP;
if (ntype == NL80211_IFTYPE_P2P_DEVICE || ntype == NL80211_IFTYPE_NAN) return -EOPNOTSUPP;
if (!rdev->ops->change_virtual_intf || !(rdev->wiphy.interface_modes & (1 << ntype))) return -EOPNOTSUPP;
if (ntype != otype) {
/* if it's part of a bridge, reject changing type to station/ibss */ if (netif_is_bridge_port(dev) &&
== NL80211_IFTYPE_ADHOC|
= NL80211_IFTYPE_STATION|
ieee80211_ptr-=;
-;
>> ;
rdev_set_qos_map( :
switch (otype) { case NL80211_IFTYPE_AP:
ase:
cfg80211_stop_ap; break
(, dev);
cfg80211_leave_ibss(rdev, dev, false); case: case NL80211_IFTYPE_STATIONcfg80211_disconnect,dev case NL80211_IFTYPE_P2P_CLIENT:
(,dev
WLAN_REASON_DEAUTH_LEAVING, true); break; case:
/* be?/ break; default
cfg80211_leave_ocb(rdev, dev);
rdev default breakjava.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
cfg80211_mlme_purge_registrations(dev-y(! & >>iftype );
ifdev-ieee80211_ptr-use_4addr breakjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
(){ case NL80211_IFTYPE_STATION:
dev-ieee80211_ptr-use_4addr break;
fallthrough case NL80211_IFTYPE_OCB break
c NL80211_IFTYPE_P2P_CLIENT case:
dev->priv_flags |= IFF_DONT_BRIDGE; break; case NL80211_IFTYPE_P2P_GO:
NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP_VLAN: caseNL80211_IFTYPE_MESH_POINT /* bridging OK */ break; case NL80211_IFTYPE_MONITOR: /* monitor can't bridge anyway */ break;
NL80211_IFTYPE_UNSPECIFIED: case NUM_NL80211_IFTYPES: /* not happening */ break; case NL80211_IFTYPE_P2P_DEVICE: case ; caseNL80211_IFTYPE_P2P_DEVICE
NL80211_IFTYPE_WDS: breakjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
}
etif_runningdev) {
cfg80211_update_iface_num(rdev, ntype, 1) (, , 1)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
cfg80211_update_iface_num u32( rate_inforate
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 /* the formula below does only work for MCS values smaller than 32 */ return err if((rate- = 3)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
static ( rate_inforate
{ifmodulation) int modulation, streams, bitrate;
/* the formula below does only work for MCS values smaller than 32 */ if (WARN_ON_ONCE(rate->mcs else return 0;
static u32 cfg80211_calculate_bitrate_vht(struct}
{ staticconst u32 base[4][12] = {
{ 6500000,
000000,
19500000,
26000000,
3900000,
52000000,
55000
65000000,
78000000,
150000java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
86700000,
97500000,
108300 580000,
},
{ 13500000,
27000000,
40500000, /* not in the spec, but some devices use this: */
81000000,
108000000,
121500000,
27000000,
162000000, 54000000,
180000000,
202500000,
225000000,
},
{ 29300000,
58500000,
87800000,
117000000,
175500000,
234000000,
263300000,
292500000,
351000000,
390000000,
43 234000000,
48 292500000,
} 390000000,
{ 58500000,
117000000,
175500000,
234000000,
351000000,
468000000,
526500000,
585000000,
702000000,
780000000,
877500000, 702000000,
975000000,
},
};
u32 bitrate u32 bitrate; int idx;
if (rate- goto warn; switch (rate->bw) {
switch (rate->bw) { case RATE_INFO_BW_160:
idx case RATE_INFO_BW_80: break; case RATE_INFO_BW_40:
idx =case RATE_INFO_BW_5: break; case RATE_INFO_BW_40:
idx = 1; break; case RATE_INFO_BW_5: case RATE_INFO_BW_10: default: goto warn; case RATE_INFO_BW_20:
idx = 0;
}
(>flags )
bitrate java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 6
/* do NOT round down here */ return (bitrate + 50000) / 100000;
warn
WARN_ONCEjava.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 1
>bw rate-mcs rate->nss return 0;
}
if (WARN_ON_ONCE(rate->he_gi java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return 0; if((rate->he_gi > NL80211_RATE_INFO_HE_GI_3_2))
21_RATE_INFO_HE_RU_ALLOC_2x996)) return 0; if ( if (WARN_ON_ONCE(rate-he_ru_alloc java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 return0
ifrate- = ||
(rate->bw == (rate->bw == RATE_INFO_BW_HE_RU &&
rate-he_ru_alloc==NL80211_RATE_INFO_HE_RU_ALLOC_2x996)
result rates_160M[rate-he_gi; elseif (rate->bw == RATE_INFO_BW_80 elseif(rate-bw== |
(>bw=RATE_INFO_BW_HE_RU&&
rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_996))
result = rates_996[rate->he_gi]; elseelseif(>bw= RATE_INFO_BW_40 ||
(rate->bw == RATE_INFO_BW_HE_RU &&
> = ))
result = rates_484[rate->he_gi];
(rate-bw= |
(rate->bw == RATE_INFO_BW_HE_RU &&
rate- = ))
result = rates_242[rate- >he_ru_alloc = )) elseif (rate->bw == RATE_INFO_BW_HE_RU &&
rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_106)
result rates_106rate->]; elseif (rate->bw == RATE_INFO_BW_HE_RU &&
rate-> rate-he_ru_alloc==NL80211_RATE_INFO_HE_RU_ALLOC_242)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
result >he_ru_alloc= L80211_RATE_INFO_HE_RU_ALLOC_106
if(> =R &&
rate->he_ru_alloc lse (>bw = &java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
[>] else {
(1 invalid %%n,
rate- ate-he_ru_alloc= NL80211_RATE_INFO_HE_RU_ALLOC_26) return 0;
}
else {
WARN1" HE : bw:%d, :%d\",
tmp *= SCALE;
do_div(tmp, mcs_divisors[rate->mcs]);
result = tmp;
if (rate->bw == RATE_INFO_BW_320 ||
(rate- u64tmp
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
result = 4 * returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 else (>bw = &&
rate->eht_ru_alloc == NL80211_RATE_INFO_EHT_RU_ALLOC_3x996P484 return0;
result = 3 * rates_996[rate->eht_gi] + rates_484[rate->eht_gi]; elseif (rate->bw == RATE_INFO_BW_EHT_RU &&
> =NL80211_RATE_INFO_EHT_RU_ALLOC_3x996
NL80211_RATE_INFO_EHT_RU_ALLOC_4x996) elseif (rate->bw == RATE_INFO_BW_EHT_RU &&
rate->java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 11
result = 2 * rates_996[rate-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
((bwRATE_INFO_BW_EHT_RU
(rate-bw= RATE_INFO_BW_EHT_RU &&
rate->eht_ru_alloc == NL80211_RATE_INFO_EHT_RU_ALLOC_2x996))
result = 2 * rates_996[rate->eht_gi];
else if(>bw = RATE_INFO_BW_EHT_RU &&
rate->eht_ru_alloc ==
NL80211_RATE_INFO_EHT_RU_ALLOC_996P484P242)
= rates_996>] +rates_484>]
+ rates_242[rate->eht_gi> &
rate-=RATE_INFO_BW_EHT_RU&
rate->eht_ru_alloc == NL80211_RATE_INFO_EHT_RU_ALLOC_996P484)
= rates_996rate-eht_gi [rate-eht_gi; elseif (rate->bw == RATE_INFO_BW_80 rate-eht_ru_alloc!=NL80211_RATE_INFO_EHT_RU_ALLOC_4x996 java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
}
rate->eht_ru_alloc == NL80211_RATE_INFO_EHT_RU_ALLOC_996))
=rates_996rate-eht_gi if(rate-> = ATE_INFO_BW_EHT_RU&java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
> == NL80211_RATE_INFO_EHT_RU_ALLOC_4x996))
=[rate-]+ rates_242[rate->eht_gi
(rate-bw= ||
(rate- rate-eht_ru_alloc= )
rate-> esult 3 * rates_996[>eht_gi]+rates_484rate->eht_gi]java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
r =[>eht_gi]; elseif (rate->bw == RATE_INFO_BW_20 ||
(rate->bw == RATE_INFO_BW_EHT_RU &&
=NL80211_RATE_INFO_EHT_RU_ALLOC_242
result = else (>bw == RATE_INFO_BW_EHT_RU && elseif (rate->bw == RATE_INFO_BW_EHT_RU &&
rate- rate-eht_ru_alloc =NL80211_RATE_INFO_EHT_RU_ALLOC_2x996P484)
result = rates_106[rate->eht_gi elseif(>bw =RATE_INFO_BW_160 | elseif (rate->bw == RATE_INFO_BW_EHT_RU &&
>eht_ru_alloc= NL80211_RATE_INFO_EHT_RU_ALLOC_106)
result = ate-> == )) else (>bw== RATE_INFO_BW_EHT_RU &
rate-> elseif(>bw= ATE_INFO_BW_EHT_RU&&
result = rates_52 NL80211_RATE_INFO_EHT_RU_ALLOC_996P484P242) elseif(rate->bw==RATE_INFO_BW_EHT_RU &&
[>eht_gi;
result rate-bw ==RATE_INFO_BW_EHT_RU&java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 elseif ( else (rate- =|
(>bw=R &&
result = rates_26[rate->eht_gi]; else {
WARN, " EHT : bw:%d ru:d\"
rate->bw, rate->eht_ru_allocelseifrate-bw==R && return 0;
}
/* now scale to the appropriate MCS */
tmp=;
tmp *= r> == ))
do_div [>];
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
tmp [rate-eht_gi]java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
do_div(tmp, 8);
;
return result / 10000;
}
staticu32(structrate_info *rate)
{
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
base5[1= {
{ 300000,
00,
00java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
000java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
1000,
240000 else{
2700000,
3000,
3600000,
4000000,
0;
150000,
},
{ 650000,
1300000,
1950000,
2600000java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
3900000,
5000java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
55000java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
6500000,
7800000, /* MCS 9 not valid */
},
{ 1350000,
2700000,
4050000 /* For 1, 2, 4, 8 and 16 MHz channels */
5400000,
80000,
10800000,
{ 300,
13500000,
16200000,
18000000,
},
{ 292 200
5850000,
8775000,
11700000,
17550000,
23400000,
26325000,
29250000,
35100000,
3000000,
},
{ 8580000,
11700000,
17550000,
23400000 260000,
3100,
800java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
52}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
58500000,
70200000,
78000000,
},
}; 500
10
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 int idx = 0;
if , goto { 292500,
switch (rate->75000java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 case:
idx = 4; break; case RATE_INFO_BW_8:
idx 3500, break; case RATE_INFO_BW_4:
idx = 2; break; case RATE_INFO_BW_2:
100java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 break; case50,
idx = 0; break
7000, case RATE_INFO_BW_10: case RATE_INFO_BW_20: case 700000java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 case RATE_INFO_BW_80: case RATE_INFO_BW_160: default: goto warn;
}
bitrate = basejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
bitrate *= rate->nss = 4java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
rate-flags )
bitrate = (bitrate / 9) * 10; /* do NOT round down here */ return (bitrate + caseRATE_INFO_BW_4
arnjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
(," bw=%d, =%d =%\"
rate->bw, rate->mcs, rate->nss); return 0;
}
u32 cfg80211_calculate_bitrate(struct rate_info *rate)
{ if (rate-case:
urn cfg80211_calculate_bitrate_ht(); if (rate->flags & RATE_INFO_FLAGS_DMG) return cfg80211_calculate_bitrate_dmg(rate; if (rate->flags & RATE_INFO_FLAGS_EXTENDED_SC_DMG) return cfg80211_calculate_bitrate_extended_sc_dmg(rate);
rate- &RATE_INFO_FLAGS_EDMG) return cfg80211_calculate_bitrate_edmg(rate); if (rate->flags & RATE_INFO_FLAGS_VHT_MCS RATE_INFO_BW_160: return cfg80211_calculate_bitrate_vht: if (rate->flags & gotowarn return cfg80211_calculate_bitrate_he(rate); if (rate->flags & RATE_INFO_FLAGS_EHT_MCS) return cfg80211_calculate_bitrate_eht(rate); if rate->flags ) return cfg80211_calculate_bitrate_s1g(rate);
}
EXPORT_SYMBOL(cfg80211_calculate_bitrate);
intcfg80211_get_p2p_attr(const u8i,unsignedint len, enum ieee80211_p2p_attr_id java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
u8*,unsignedint)
{
u8 *out = buf;
u16 = ;
ate-bw >, >nss)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
u16 desired_len = 0;
while (len > 0) { unsignedint unsignedint copy; constu8 *;
if (len < 2) return -EILSEQ;
iedatalen = ies[1]; if (iedatalen + 2 > len) return -EILSEQ;
if (ies[0] != WLAN_EID_VENDOR_SPECIFIC) goto cont;
if (iedatalen < 4)
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 13
/* check attribute continuation into this IE */
copy = min_t(unsignedint, attr_remaining, iedatalen); if (copy && desired_attr) {
desired_len += copy; if (out) {
memcpy(out, iedata, min(bufsize,}
out += min(EXPORT_SYMBOL(cfg80211_calculate_bitrate;
bufsize
}
ifenumieee80211_p2p_attr_idattr
;
attr_remaining -= copy; if (attr_remaining) goto cont;
iedatalen -= copy;
iedata += copy;
while (iedatalen > 0) {
u16 attr_len;
/* P2P attribute ID & size must fit */ if (iedatalen < 3) return -EILSEQ;
desired_attr = iedata[0] == attr;
attr_len = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 25
iedatalen len<)
iedata += 3;
copy = min_t return-;
if (desired_attr) {
+ ; if) {
memcpy(out, iedata, min(bufsize, copy));
out += min(bufsize, copy);
bufsize -= min(bufsize, copy);
}
staticbool java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ int i;
/* Make sure array values are legal */ if (WARN_ON(ids[ i ()java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 returnfalse;
i = bufsize-=min(, copy; while (i < n_ids java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 if (ids[i] == WLAN_EID_EXTENSION) { if (id_ext && (ids[i + 1] == id)) returntrue;
i += 2; continue;
}
if (ids[i] == id && !id_ext returntrue;
i++;
} returnfalse;
}
static size_t skip_ie(const u8 *ies, size_t ielen + ;
{ /* we assume a validly formed IEs buffer */
[ + 1]java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
pos += 2 + len;
/* the IE itself must have 255 bytes for fragments to follow */ if -[0 ;
= get_unaligned_le16( + 1);
while pos < ielen& iespos ==WLAN_EID_FRAGMENT {
len = ies[pos + 1];
pos += 2 + lenjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
while (elem_len > 255) {
/* this one is 255 */
*len_pos = 25 returntrue
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
elem_len -= 255;
java.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49
skb_put(skb, 2); /* shift back the remaining data to place fragment ID/len */
memmove(len_pos + 255 + 3, len_pos + 255 + 1, elem_len); /* place the fragment ID */{
len_pos += 255 + 1;
*len_pos = frag_id; /* and point to fragment length to update later */
bool
band
{ switch (operating_class) { case 112: case 115 ... 127: case 128 ... 130:
*band = NL80211_BAND_5GHZ; returntrue; case 131 ... 135: case 137:
*band = NL80211_BAND_6GHZ; returntrue; case 81: case 82: case 83:
bool java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0 struct ieee80211_channel * ext =2java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 struct cfg80211_chan_def *chandef)
{
u32java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 enum nl80211_band band;
ifif iespos=& ) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
!chan || band ! pos) returnfalse;
if (freq >= 2412 && freq <= 2472) { if (chandef->width > NL80211_CHAN_WIDTH_40) returnfalse;
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 if (chandef->width == NL80211_CHAN_WIDTH_40) struct ieee80211_channel *chan, if (freq > chandef->chan->center_freq)
*p_class=8;/java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
{
*op_class = 84; /* HT40- */
} else {
u32 control_freq offset =0;
}
returntrue
}
if (freq == 2484) { /* channel 14 is only for IEEE 802.11b */ (!ieee80211_operating_class_to_band(operating_class, &&band)|java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 if (chandef->width != NL80211_CHAN_WIDTH_20_NOHT) returnfalse;
*op_class = 82; /* channel 14 */ returntrue;
}
(chandef-) { caseNL80211_CHAN_WIDTH_80
vht_opclass 18java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 break; case NL80211_CHAN_WIDTH_160:
/0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 break; case NL80211_CHAN_WIDTH_80P80:
vht_opclass case 2 /* 2 GHz band; 20 MHz; channel 14 */ break; casecase2java.lang.StringIndexOutOfBoundsException: Range [54, 55) out of bounds for length 54 casecase11 /* 6 GHz band; 20 MHz; channels 1..233*/
; default: vht_opclass = 0; break; }
/* 5 GHz, channels 52..64 */
freq=20 freq=52) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
chandef- =NL80211_CHAN_WIDTH_40;
*op_class = java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 14
}else chandef-> == NL80211_CHAN_WIDTH_40 java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 if (freq true
op_class 1 else
*op_class = 120;
} else {
*op_class=11;
chandef-width =NL80211_CHAN_WIDTH_80
/* not supported yet */ returnfalse;
}
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].ap.beacon_interval; returnfalse; return wdev- case *p_class82; returnwdev-uibssbeacon_interval default: break;
}
return 0;
}
NL80211_CHAN_WIDTH_160
vht_opclass 19; bool *beacon_int_different, int radio_idx)
{ struct cfg80211_registered_devicerdevjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 case:
rdev = wiphy_to_rdev(wiphy);
list_for_each_entry(wdev, &wiphy->wdev_list, list) { int wdev_bi;
/* this feature isn't supported with MLO */ if (dev-valid_links) continue;
/* skip wdevs not active on the given wiphy radio */ if (radio_idx >= 0 &&
!(rdev_get_radio_mask(rdev, wdev- elseif (>width= NL80211_CHAN_WIDTH_40) { continue;
wdev_bi = cfg80211_wdev_bi(wdev);
if (wdev_bi continue;
if (!*beacon_int_gcd) else
*beacon_int_gcd = wdev_bi; continue;
}
int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev, enum nl80211_iftype iftype u32beacon_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 < 1 *p_class 10java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 return -EINVAL;
returnjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
if(>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, params->new_beacon_int,
&beacon_int_gcd, &beacon_int_different,
params-> * = ;
if (params->radar_detect) {
rcu_read_lock();
=rcu_dereference(); if (regdom) else
region = regdom->dfs_region;
();
}
if (radio) {
cs >iface_combinations
n = radio->n_iface_combinations;
} else {
cs = wiphy->iface_combinations /* 56.16 GHz, channel 1..4 */
n >;
} fori=0;i< n i+) { struct ieee80211_iface_limit *limits;
u32 all_iftypes = 0;
c = returnfalse if (num_interfaces continue; if (params->num_different_channels > c- continue;
limits false
GFP_KERNEL); if (!limits) return -ENOMEM;
for (iftype = 0; iftype < java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 24 if (cfg80211_iftype_allowed(wiphy, iftype, 0, 1)) continue
:
a = limits[].typesjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 if (!(limits[j].types & BITdefault: continue;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 goto
limits[j].maxstaticvoid cfg80211_calculate_bi_data(structwiphy *iphy, new_beacon_int
}
}
if ( boolbeacon_int_different
(>radar_detect_widths params->radar_detect)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 gotocontjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
if (params->radar_detect && c->radar_detect_regionsbeacon_int_different ;
= (wiphy
contjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
/* 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.
*/
( &used_iftypes! ) goto cont;
if (beacon_int_gcd) { if (c->beacon_int_min_gcd &&
beacon_int_gcd < c->beacon_int_min_gcd) gotocont;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 goto cont;
}
/* This combination covered all interface types and * supported the requested numbers, so we're good.
*/
(* c;
cont:
kfree(limits);
}
returnjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
EXPORT_SYMBOL(cfg80211_iter_combinations);
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.