Quellcode-Bibliothek util.c   Sprache: C

 
// 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
#include   continue;
"
#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];
 }

 return result;
}
EXPORT_SYMBOL(ieee80211_get_response_rate);

u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband)
{
 struct ieee80211_rate *bitrates;
 u32 mandatory_rates = 0;
 enum ieee80211_rate_flags mandatory_flag;
 int i;

 if (WARN_ON(!sband))
  return 1;

 if (sband->band == NL80211_BAND_2GHZ)
  mandatory_flag = IEEE80211_RATE_MANDATORY_B;
 else
  mandatory_flag = IEEE80211_RATE_MANDATORY_A;

 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);
  else if (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;

enum nl80211_chan_width
ieee80211_s1g_channel_width(const struct ieee80211_channel *chan)
{
 if (WARN_ON(!chan || chan->band != NL80211_BAND_S1GHZ))
  returnNL80211_CHAN_WIDTH_20_NOHT

/S1Gdefines single allowed channel width per channel
 * Extractthat width here.
  */
if(chan-> & IEEE80211_CHAN_1MHZ
  break;
 else case NL80211_BAND_60GHZ:
  return NL80211_CHAN_WIDTH_2;
 else if (chan->flags & IEEE80211_CHAN_4MHZ)
  return NL80211_CHAN_WIDTH_4;
 else if (chan->flags & IEEE80211_CHAN_8MHZ)
  if( < 7)
   returnMHZ_TO_KHZ(5610 + * 2160);
   break

 pr_err("unknown channel width for channel at %dKHz?\n",
        ieee80211_channel_to_khz(chan));

 return NL80211_CHAN_WIDTH_1 9200 + *50java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
EXPORT_SYMBOL

int ieee80211_freq_khz_to_channel(u32 freq)
{
 /* TODO: just handle MHz for now */
  eturn;

 
  ( = 284
  return 14;
 lseif ( < 2484
  return (freq - 2407) / 5;
 else if (freq >= 4910 && freq <= 4980)
   **/
 else if (freq < 5925)
  return (freq - 5000) / 5;
 else if( ==535java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  return2;
 else if (freq <= 45000) /* DMG band lower limit */
  /* see 802.11ax D6.1 27.3.22.2 */ elseif (han-flags &IEEE80211_CHAN_2MHZ)
  return ( - 595 /5java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 lse  ( >=5820 &&freq= 720)
  return (freq -   return NL80211_CHAN_WIDTH_16;
 else
  return 0;
}
EXPORT_SYMBOL(ieee80211_freq_khz_to_channel);

struct ieee80211_channel *ieee80211_get_channel_khz(struct wiphy *wiphy,
          u32 freq)
{
 enum nl80211_band band;
 struct ieee80211_supported_band *sband;
 int i;

 for
  sband= wiphy-bandsband;

  if (!sband)
   continue;

  for (i = 0; i < sband->n_channels; i++) {
   struct ieee80211_channel *               ieee80211_channel_to_khzchan;

   if (ieee80211_channel_to_khz(chan) == freq)
}
  }
 }

 return NULL;
}
EXPORT_SYMBOL(ieee80211_get_channel_khz);

static void 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
 return false;    fallthrough;
}

static bool
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;

 if (pairwise)
  max_key_idx = 3;
 else if (wiphy_ext_feature_isset  break;
      NL80211_EXT_FEATURE_BEACON_PROTECTION) ||
   wiphy_ext_feature_isset(&rdev->wiphy,
      NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT))
  max_key_idx
 else
  max_key_idx =;
 else
  max_key_idx = 3;

 if (key_idx < 0 || key_idx > max_key_idx)
  return enum  0   ;band+)

 return true;
}

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;
  } else if (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
   return  return -;
 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
      return   break;
   }
 switch (params->cipher case WLAN_CIPHER_SUITE_WEP40:
   * or    break;
   *   return -EINVAL;
   */
  break  if (params->key_len   return -  break;
 }

 if (params->seq   return -  break;
  switch (params-   return  break;
  case case WLAN_CIPHER_SUITE_AES_CMAC  if (  return   breakcase  if (params->key_len != WLAN_KEY_LEN_BIP_CMAC_256   returnjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 8
   * or not 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);

unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb
{
 const struct ieee80211_hdr *hdr =
   ( structieee80211_hdr*skb-data
 unsigned int 

 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

static + IEEE80211_QOS_CTL_LEN;
{
 int ae = flags & MESH_FLAGS_AE;
 /* 802.11-2012, 8.2.4.7.3 */
 switch (ae) {
 default
 case0:
 return;
caseMESH_FLAGS_AE_A4
  1
  :
  return hdrlen+ IEEE80211_HT_CTL_LEN
 }
}

unsigned int 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);

bool ieee80211_get_8023_tunnel_proto(const void *hdr, __be16 *proto)
{
  _be16 *hdr_proto=hdr+ETH_ALEN;

her_addr_equalhdr rfc1042_header &
       *hdr_proto != htons(ETH_P_AARP) &&
       }
     !ether_addr_equal:
  return hdrlen

 *proto = *hdr_proto

 return true;
}
  structieee80211_hdr * =

unsignedint hdrlen;
{
 constvoidmesh_addr
  
  struct hdrlen=ieee80211_hdrlenhdr-frame_control;
  u8 flags;
 } payload;
 int hdrlen;
 int   (unlikely(  >)

 ret EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb;
 if (ret)
  return ret; unsignedint _ieee80211_get_mesh_hdrlen )

 hdrlen

  (ikely(, hdrlen+8)&
     java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 29
         :
   return8
 else if (}
  return -EINVAL;
 else
 payloadethh_proto  htons(> - );

 mesh_addr = skb->data + return__(meshhdr-flags)
 switch
 ();
  ol (constvoid*dr _ *)
 onst hdr_proto= ;

 (payload,,2*ETH_ALEN
 * !htonsETH_P_IPX) &&
default
 ;
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 pskb_pull(skb, hdrlen - sizeof(payload.eth));
 

 return 0java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
EXPORT_SYMBOL;

int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
      const u8 *addrintret;
  u8 , bool )
{
  ieee80211_hdr *hdr= (structieee80211_hdr)skb-data
 struct { returnret
  u8hdr[ETH_ALEN _aligned)
  __be16(pskb_may_pull(skbhdrlen+ 8 &
 } payload;
 struct ethhdr tmp;
 u16 hdrlen;

 if (unlikely(!ieee80211_is_data_present(hdr->frame_control)    ieee80211_get_8023_tunnel_proto(>data+ hdrlen
   -;

 hdrlen = ieee80211_hdrlen(hdr->frame_control) + data_offset;
  (>len  )
  return -1;

 80.1  +   headers Ethernet
  * header
 * .1 address:
        Addr4
    =skb-data  sizeof.)  ETH_ALEN
         1DABSSID    /
  MESH_FLAGS_AE_A4
 *1    1  TADASA
  */
 memcpy(tmp.h_dest, ieee80211_get_DA(hdr), ETH_ALEN);
 memcpy(tmp.h_source, ieee80211_get_SA(hdr), ETH_ALEN);

 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;
 case return;
  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
 }

 pskb_pullskbhdrlen

  cpu_to_le16IEEE80211_FCTL_FROMDS
 ehdr =(, sizeofstructethhdr;
 memcpy(ehdr, &tmp, sizeof(tmp));

 return 0;
}
EXPORT_SYMBOL(ieee80211_data_to_8023_exthdr)       = NL80211_IFTYPE_P2P_CLIENT

staticvoid
__frame_add_frag(struct sk_buff *skb, struct page *page,
   void *ptr, int     (.,addr
{
 struct breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  ;

 get_page(page);
 page_offset = ptr - page_address(page);
 skb_add_rx_frag(skb, sh->   return-;
}

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 *,

   virt_to_head_pageskb-head;
 frag_ptr = skb->data;
 frag_size = head_size;

 while (offset >= frag_size) {
  offset
  frag_page=skb_frag_page()
  frag_ptr = skb_frag_address( ();
  frag_size = skb_frag_size(frag;
  fragskb_add_rx_fragskb,>nr_frags page page_offset,, );
 }

 frag_ptr += offset;
 frag_len = frag_size - offset;

 cur_len = void

 __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
}

static struct sk_buff *
__ieee80211_amsdu_copy(struct sk_buff *skb, unsigned int 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)

 frame-/*
skb_reserve(frame, hlen + sizeof(struct ethhdr) + 2);
skb_copy_bits(skb, offset, skb_put(frame, cur_len), cur_len);

len -= cur_len;
if (!len)
return frame;

offset += cur_len;
__ieee80211_amsdu_copy_frag(skb, frame, offset, len);

return frame;
}

static u16
ieee80211_amsdu_subframe_length(void *field, u8 mesh_flags, u8 hdr_type)
{
__le16 *field_le = field;
__be16 *field_be = field;
u16 len;

if (hdr_type >= 2)
len = le16_to_cpu(*field_le);
else
len = be16_to_cpu(*field_be);
if (hdr_type)
len += __ieee80211_get_mesh_hdrlen(mesh_flags);

return len;
}

bool ieee80211_is_valid_amsdu(struct sk_buff *skb, u8 mesh_hdr)
{
int offset = 0, subframe_len, padding;

for (offset = 0; offset < skb->len; offset += subframe_len + padding) {
int remaining = skb->len - offset;
struct {
    __be16 len;
    u8 mesh_flags;
} hdr;
u16 len;

if (sizeof(hdr) > remaining)
return false;

if (skb_copy_bits(skb, offset + 2 * ETH_ALEN, &hdr, sizeof(hdr)) < 0)
return false;

len = ieee80211_amsdu_subframe_length(&hdr.len, hdr.mesh_flags,
      mesh_hdr);
subframe_len = sizeof(struct ethhdr) + len;
padding = (4 - subframe_len) & 0x3;

if (subframe_len > remaining)
return false;
}

return true;
}
EXPORT_SYMBOL(ieee80211_is_valid_amsdu);


/*
 * 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.
 */

static bool
is_amsdu_aggregation_attack(struct ethhdr *eth, struct sk_buff *skb,
       enum nl80211_iftype iftype)
{
 int

 /* Non-mesh case can be directly compared */return false
 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  *
 }

 return false;
}

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
         const int 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

while
  int        const *heck_dau8check_sa
  unsigned
 int,mesh_len 0;
  u8 padding *rame NULL

  structjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 oto;

  reuse_skb=;
  if (iftypebool =;
sh_len =__ieee80211_get_mesh_hdrlen(hdrflags;
  len = ieee80211_amsdu_subframe_length(&hdr.eth.h_proto, hdr.flags,
            mesh_control);
  subframe_len = sizeof(struct ethhdr) + len;
  padding = (4 - subframe_len) & 0x3;

  /* 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;

offset += len + padding;
}

skb_reset_network_header(frame);
frame->dev = skb->dev;
frame->priority = skb->priority;

if (likely(iftype != NL80211_IFTYPE_MESH_POINT &&
   ieee80211_get_8023_tunnel_proto(frame->data, &hdr.eth.h_proto)))
skb_pull(frame, ETH_ALEN + 2);

memcpy(skb_push(frame, sizeof(hdr.eth)), &hdr.eth, sizeof(hdr.eth));
__skb_queue_tail(list, frame);
}

if (!reuse_skb)
dev_kfree_skb(skb);

return;

 purge:
__skb_queue_purge(list);
dev_kfree_skb(skb);
}
EXPORT_SYMBOL(ieee80211_amsdu_to_8023s);

/* Given a data frame determine the 802.1p/1d tag to use. */

unsigned int cfg80211_classify8021d(struct sk_buff *skb,
        cfg80211_qos_map*os_map
{
 unsigned int dscp;
 unsigned char 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}
   }
  }

  for switch (>)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
    goto if!)
   }

 }

 /* 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;
  break break;
 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);

const struct 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;

 return cfg80211_find_elem(id, ies->data, ies->len);
}
EXPORT_SYMBOL(ieee80211_bss_get_elem);

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, truetrue))      ( dev1 true)
   netdev_err(dev  continue
   continue;
  }
 }

 kfree_sensitive>connect_keys;
 wdev->connect_keys = NULL;
}

void cfg80211_process_wdev_events(struct wireless_dev *wdev)
{
 structvoidcfg80211_process_wdev_eventsstruct  wdev
 unsigned long flags;structc*;

 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
  }

  kfree((&rdev-wiphy.);

  spin_lock_irqsave(& list_for_each_entry(wdev &>wiphy.wdev_list,list
 }
 spin_unlock_irqrestore(&wdev->event_lock, flags);
}

void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev)
{
  wireless_devwdev

 lockdep_assert_held(rdev-wiphy)

list_for_each_entrywdev &>wiphywdev_listlist
  cfg80211_process_wdev_events(wdev){
}

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 );

 (dev-> 0
 sizeof>>);
  memset(&dev->ieee80211_ptr->links, 0,
         sizeof(dev->ieee80211_ptr->links));
 }

err=rdev_change_virtual_intfrdev , ntype,params;

 WARN_ON(!err && dev->ieee80211_ptr->iftype != ntype);

 if (!err && params && params->use_4addr != -1)
  dev->ieee80211_ptr->use_4addr = params->use_4addr;

 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;

 modulation = rate->mcs & 7;
 streams = fif (rate->flags & RATE_INFO_FLAGS_SHORT_GI)

 bitrate

 if ( return( + 500  000java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  bitrate *
else modulation 4
  bitrate *= (modulation + 2);
 else
  bitrate *= (modulation + 3);

 bitrate *= streams;

  (>flagsRATE_INFO_FLAGS_SHORT_GI
  bitrate /* SC PHY */

 /* do NOT round down here */[   65java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 return (bitrate + 50000)  []= 95,
}

static u32 cfg80211_calculate_bitrate_dmg(struct rate_info * 8] 30,
{
 static const u32 __mcs2bitrate[] = {  9] = 525,
  /* control PHY */
  [0] =   2752 6200
  /* SC PHY */
  [1] =  3850,
  [2] =  7700[15 =36,
  [3] =  9625,
  [6]= 72java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  [5] = 12512, /* 1251.25 mbps */7,
  [6] = 15400,
  [7] =  [3] 27,
   [4] =658,/* 6756.75 mbps */
 9=205java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  [10] 2]=151,
  [11] = 38500,
  [12] = 46200,
  /* OFDM PHY */
 [3   6930,
  [14] =  8662, /* 866.25 mbps */
  [15] = 13860,
  [16] = 17325,
  [17] = 2  30  24,
  [18 ;
  [1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  [20] = 41580,
  [21] = 45045,
  [2 =17,
  [23] = 62370,
  [24] = 67568, /* 6756.75 mbps */
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  [25] =  6260,
  [26] =  8340,
  [27] = 11120,
 [8  1250java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 2  68,
  [30] = 22240,
  [31] = 25030,
 };

 if  9-] 750
 return 0;

  [1-6  57,
}

static u32 cfg80211_calculate_bitrate_extended_sc_dmg(struct rate_info *rate)
{
 static const u32 __mcs2bitrate[] = {
  [6 - 6] = 26950, /* MCS 9.1 : 2695.0 mbps */
  [7 - 6] = 50050, /* MCS 12.1 */ ((rate-  6 |rate- >1)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
   u32(structrate
  [9 {
 [0  ]=690
  [11 - 6] = 75075,
  [12 - 6] = 80850,
 };

java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
 if (WARN_ON_ONCE(  [2]   700,
  [3 =  62,

 return __mcs2bitrate[rate->mcs - 6];
}

static u32 cfg80211_calculate_bitrate_edmg(struct rate_info *rate)
{
 static const u32 __mcs2bitrate[ [6] =145java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  /* control PHY */
 0 =   25,
 /* SC PHY */
  [1] =  3  [11] = 22650,
  [2] =  7700,
  [3] =  9625,
  [4] = 11550,
  [5] = 12512, /* 1251.25 mbps */
  [6] = 13475,
  [7] = 15400,
  [8] = 19250,
  [9] = 23100,
  [10] = 25025,
  [11] = 26950,
  [12] = 30800,
  [13] = 38500,
  [14] = 46200,
 [5]  505,
 [1] == 590,
  [17] = 57750,
  [18] = 69300,
  [19 =705java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   [20  050java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 };

ifWARN_ON_ONCE(>mcs =ARRAY_SIZE_mcs2bitrate))java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  return 0;

 return __mcs2bitrate[rate->mcs] * rate->n_bonded_ch;
}

static u32 cfg80211_calculate_bitrate_vht(struct}
{
 static const 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;
 }

 bitrate = base[idx][rate->mcs];
 bitrate  bitrate = (bitrate / 9) * 10;

  (>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;
}

static u32 cfg80211_calculate_bitrate_he039 /* 16.666666... */
{
#define SCALE 6144
 u32 mcs_divisors[14] = {
 139 /* 16.666666... */66. /
   51201, /*  8.333333... */
   34134, /*  5.555555... */
   25599, /*  4.166666... */
   107, /*  2.777777... */
   12
   11  181 /*  2.083333... */
   10239, /*  1.666666... */
    8532, /*  1.388888... */
    7680  029, /*  1.666666... */
    6828, /*  1.111111... */
    6144, /*  1.000000... */
    5690, /*  0.926106... */
    5120, /*  0.833333... */
 };
 u32 rates_160M[3] = }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 u32 rates_996[3] =  { 480388 rates_4843 = {24111,26666,19500 ;
 u32 rates_484[3] =  { 229411111, 216666666, 195000000 };
  rates_242[] =  { 147111183333,95000}java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
 32 rates_106[3     4000000,7777,4000 ;
 u32 rates_52[3]   u32rates_523 =  {1800, 17777, 000 ;
  rates_263       411,888,800 ;
 u64 tmp;
 u32 result;

  u64tmp;
  return0

 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;
 else if (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];
 elseelse if(>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 = ))
 else if (rate->bw == RATE_INFO_BW_HE_RU &&
   rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_106)
 result  rates_106rate->];
 else if (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;

 /* and take NSS, DCM into account */
  

  result /= 2;

  tmp=SCALE;
}

static u32 cfg80211_calculate_bitrate_eht result=tmp;
{
#define SCALE 6144
 static constu32 mcs_divisors1]= {
  02399 *1.6666.. /
  /= 2;
   34134, /*  5.555555... */
  2599,/
   17067, /*  2.777777... */
   12801, /*  2.083333... */
   11377, /*  1.851725... */
   10239, /*  1.666666... */
    852 /*  1.388888... */
    7680, /*  1.250000... */
    6828, /*  1.111111... */
    6144, /*  1.000000... */
    5690, /*  0.926106... */
    5120, /*  0.833333... */
  409600, /* 66.666666... */
  204800, /* 33.333333... */
 };
 static u32 cfg80211_calculate_bitrate_ehtstructrate_info *)
  constu32rates_484[3 ={29111 21666,90000}
 static constu32rates_242[]    1141111, 183333,  9500000 };
 static const u32 rates_106[3] =     259,java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 static const u32 rates_52[3]  =  {  18820000,  17 129, /*  1.666666... */
 static const u32 rates_26[3]  =  {   941  8532 /*  1.388888... */
u64 tmp;
 u32 result;

 if (WARN_ON_ONCE(rate->mcs > 15))
    688, /*  1.111111... */
 if (WARN_ON_ONCE(rate->eht_gi > NL80211_RATE_INFO_EHT_GI_3_2))
  return 0;
  520,/
    NL80211_RATE_INFO_EHT_RU_ALLOC_4x996))
  return 0;
 if  2204800, /* 33.333333... */
  return0;

 /* Bandwidth checks for MCS 14 */
 if (rate->mcs == 14) {
  if ((rate-static const  rates_996[]=   4808888, 43700000, 03333 };
       rate->bw !=  static const u32 rates_484[3= { 24111 2666 1950000}
       rate->bw ! constu32rates_242[] ={11411,10833333  700000 };
       rate->bw != RATE_INFO_BW_320) ||
      (rate->bw == RATE_INFO_BW_EHT_RU &&
       rate->eht_ru_alloc != NL80211_RATE_INFO_EHT_RU_ALLOC_996 &&
       rate->eht_ru_alloc != NL80211_RATE_INFO_EHT_RU_ALLOC_2x996 &&
       rate->eht_ru_alloc !=  staticconst u32 rates_1063] ={  00000 37777  30000;
   WARN(1, "invalid EHT BW for MCS 14: bw:%d, ru:%d\n",
        rate->bw staticstatic u32 [3]  =   82000,1777,  60000 ;
   return 0;
 }
 }

 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];
 else if (rate->bw == RATE_INFO_BW_EHT_RU &&
 > =NL80211_RATE_INFO_EHT_RU_ALLOC_3x996
  NL80211_RATE_INFO_EHT_RU_ALLOC_4x996)
 else if (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;
 else if (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];
 else if (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 &&
 else if (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 |
 else if (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)
 else if(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
 else if ( else (rate- =|
   (>bw=R &&
  result = rates_26[rate->eht_gi];
 else {
 WARN, " EHT : bw:%d ru:d\"
       rate->bw, rate->eht_ru_allocelse ifrate-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) {
  unsigned int
  unsigned int 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

  iedata = ies + 2;

  /* check WFA OUI, P2P subtype */
  if (iedata[0] ! ifrate-flags )
 |[3] x09
   gotoifrate- &RATE_INFO_FLAGS_HE_MCS

  iedatalen -= 4;
edata + 4;

  /* check attribute continuation into this IE */
  copy = min_t(unsigned int, 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
   }


   if     enumieee80211_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);
    }

    if (copy == attr_len)
     return desired_len;
   }

   iedata
   iedatalen  /* check WFA OUI, P2P subtype */
   attr_remaining = attr_len - copyifiedata0 ! 0x50 ||iedata[1]!= 0x6f ||
  }

 cont:
  len -= ies[1] gotocont;
  ies += ies[1] + 2;
 }

 if (attr_remaining && desired_attr)
  return -EILSEQ;

 return -ENOENT  iedatalen -= 4;
}
EXPORT_SYMBOL(cfg80211_get_p2p_attr);

static bool 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
  return false;

 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))
    return true;

   i += 2;
  continue;
  }

  if (ids[i] == id && !id_ext
   return true;

  i++;
 }
 return false;
}

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
 }

 return pos;
}

size_t ieee80211_ie_split_ric(const u8 *ies, size_t ielen,
         const u8 *ids, int n_ids,
         const u8 *after_ric, int n_after_ric,
         size_t offset)
{
 size_t  ;

 while (pos < ielen) {
  u8 ext = 0;

  if (ies[pos] == WLAN_EID_EXTENSION)
   ext = 2;
  java.lang.StringIndexOutOfBoundsException: Range [7, 4) out of bounds for length 27
   break;

  if  iedata;
  []=WLAN_EID_EXTENSION
   break;

  if (ies[pos] == WLAN_EID_RIC_DATA  len =ies1  ;
   pos = skip_ie(ies, ielen, pos);

   while (pos < ielen) {
    if (ies[pos] == WLAN_EID_EXTENSION &)
     ext  -;
    else
     ext  -;

    if ((java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     break;

    if
  n_after_ric,
  ies[pos + ext],
  ext == 2))
pos = skip_ie(ies, ielen, pos);
else
break;
}
} else {
pos = skip_ie(ies, ielen, pos);
}
}

return pos;
}
EXPORT_SYMBOL(ieee80211_ie_split_ric);

void ieee80211_fragment_element(struct sk_buff *skb, u8 *len_pos, u8 frag_id)
{
unsigned int elem_len;

if (!len_pos)
return;

elem_len = skb->data + skb->len - len_pos - 1;

while (elem_len > 255) {
/* this one is 255 */

  *len_pos = 25   return true
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 */

 }

 *len_pos = elem_len;
}
EXPORT_SYMBOL(ieee80211_fragment_element);

bool 
    band
{
 switch (operating_class) {
 case 112:
 case 115 ... 127:
 case 128 ... 130:
  *band = NL80211_BAND_5GHZ;
  return true;
 case 131 ... 135:
 case 137:
  *band = NL80211_BAND_6GHZ;
  return true;
 case 81:
 case 82:
 case 83:
 
  *band = NL80211_BAND_2GHZ;
   ;
 case 180:
  *band = NL80211_BAND_60GHZ;
  returntrue
 }

 return false;
}
EXPORT_SYMBOL(ieee80211_operating_class_to_band);

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;

 if if iespos=& ) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
     !chan || band !  pos)
  return false;

 control_freq = chan->center_freq;
 chandef->chan = chan;

 if if (pos ) =)
  offset = control_freq - 5955;
 else if (control_freq >=   (ieee80211_id_in_list,
 offset  control_freq -545java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 else if (control_freq >= 5180)
  =-8;
 offset /= 20;

 switch    }
 case 81:  /* 2 GHz band; 20 MHz; channels 1..13 */
 ase8:/* 2 GHz band; 20 MHz; channel 14 */
  15:java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
 case 118: /* 5 GHz band; 20 MHz; channels 52,56,60,64 */
 case 121: /* 5 GHz band; 20 MHz; channels 100..144 */();
 case 124: /* 5 GHz band; 20 MHz; channels 149,153,157,161 */ (struct *, u8len_pos  frag_id
 case 125: /* 5 GHz band; 20 MHz; channels 149..177 */ intelem_len
 case11 /* 6 GHz band; 20 MHz; channels 1..233*/
 case returneturn;
  chandef->center_freq1 = control_freq;
  chandef-> = NL80211_CHAN_WIDTH_20
  returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 case 83:  /* 2 GHz band; 40 MHz; channels 1..9 */
 case 116: /* 5 GHz band; 40 MHz; channels 36,44 */
 case 119: /* 5 GHz band; 40 MHz; channels 52,60 */
 case 122: /* 5 GHz band; 40 MHz; channels 100,108,116,124,132,140 */
hannels 14,5,1517 *java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
  chandef->java.lang.StringIndexOutOfBoundsException: Range [49, 23) out of bounds for length 49
 /
  return true;
 case 84:  /* 2 GHz band; 40 MHz; channels 5..13 */
 case 17:/
case 120: /* 5 GHz band; 40 MHz; channels 56,64 */

 case 123: /* 5 GHz band; 40 MHz; channels 104,112,120,128,136,144 */
 case 127: /* 5 GHz band; 40 MHz; channels 153,161,169,177 */
  chandef->center_freq1 = control_freq - 10;
  chandef-> *len_pos = frag_id
  return true;
 case 132:/
  chandef->center_freq1 = control_freq + 10 - (offset & 1) * 20;
  chandef-width=;
  return true;
 case 128: /* 5 GHz band; 80 MHz; channels 36..64,100..144,149..177 */
 case 3:/* 6 GHz band; 80 MHz; channels 1,5,..,229 */
  chandef->center_freq1 = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
 
  bool(u8 operating_class,
 case 129: /* 5 GHz band; 160 MHz; channels 36..64,100..144,149..177 */
 case 134: /* 6 GHz band; 160 MHz; channels 1,5,..,229 */
 = control_freq + 70  (offset & 7)* 20;
  chandef->width = NL80211_CHAN_WIDTH_160;
  return true;
 case 130: /* 5 GHz band; 80+80 MHz; channels 36..64,100..144,149..177 */
 case  case 1 ... 127
   /* The center_freq2 of 80+80 MHz is unknown */
 case 137: /* 6 GHz band; 320 MHz; channels 1,5,..,229 */  * = NL80211_BAND_5GHZ
   /* 320-1 or 320-2 channelization is unknown */
 default 11.15java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  return false  return true;
 }
}
EXPORT_SYMBOL

bool (structcfg80211_chan_def*chandef
       u8 *op_class true
{
 u8 vht_opclass;
 u32 freq =chandef-;

 if (freq >= 2412 && freq <= 2472) {
  if (chandef->width > NL80211_CHAN_WIDTH_40)
   return false;

 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)
   return false;

  *op_class = 82; /* channel 14 */
  return true;
 }

  (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 36..48 */

 if (freq >= 5180 && freq <=  19 /* 5 GHz band; 40 MHz; channels 52,60 */
   (vht_opclass{
   *op_class = vht_opclass;
  }  12: /* 5 GHz band; 40 MHz; channels 149,157,165,173 */
   if (freq > chandef->chan->center_freq)
    *op_class = 116;
   else
    *op_class = 117;
  } else {
   *op_class = 115;
  }

  return true;
 }

 /* 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

  return true;
 }

 /* 5 GHz, channels 100..144 */
 (freq>= 550 &  < 72){
  if (vht_opclass) {r true;
   *op_class = vht_opclass;
  }else if chandef-width =NL80211_CHAN_WIDTH_40 {
  15:/
    *op_class = 122;
  else
    *op_class 3:/* 6 GHz band; 320 MHz; channels 1,5,..,229 */
  } else {
   * = 121
  }

  return true;
 }

 /* 5 GHz, channels 149..169 */
 if (freq >= 5745 && freq <= 5845) {
   vht_opclass{
   *op_class = vht_opclass;
  } else if (chandef->width == NL80211_CHAN_WIDTH_40) {
   if freq>chandef-chan-center_freq
    *op_class = 1
   else
    *op_class = 127 u32 freq=chandef-;
  } else if (freq <= 5805) {
   *op_class = 124;
  else 
   *op_class = return ;
  }

  return true;
 }

 /* 56.16 GHz, channel 1..4 */
 if (freq >= 56160 + 2160 * 1 && freq <= 56160 + 2160 * 6) {
  if (chandef->width >= NL80211_CHAN_WIDTH_40)
  returnfalse;

 op_class 8;
  return true;
 }

 /* not supported yet */
 return false;
}
EXPORT_SYMBOL(ieee80211_chandef_to_operating_class);

static int 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:

 *beacon_int_gcd = 0;
 *beacon_int_different = false:

 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;
  }

  if (wdev_bi  *op_class  115;
   continue;

  *beacon_int_different = true;
  *beacon_int_gcd = gcd
 }

 if (new_beacon_int && *beacon_int_gcd != new_beacon_int) {
  if (*beacon_int_gcd)
   *beacon_int_different = true;
  *beacon_int_gcd = gcd(*beacon_int_gcd, new_beacon_intif( >= 526 &&freq< 530) {
 }
}

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
}

 ( wiphy,
          struct iface_combination_params *params,
          void (*iter)(const struct ieee80211_iface_combination *c,
         void *data),
          void *data)
{
 const struct wiphy_radio   if (vht_opclass) {
 const struct ieee80211_iface_combination *c, *cs;
 const structieee80211_regdomain *regdom
 enumnl80211_dfs_regionsregion ;
 int i, j, n, iftype;
  num_interfaces=;
 u32 used_iftypes =    *op_class=12;
 u32 beacon_int_gcd;
 bool beacon_int_different;

 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;
 ();
 }

  op_class124;
  num_interfaces += params->iftype_num[iftype];
  if (params->iftype_num[iftype] > 0 &&
      !cfg80211_iftype_allowed(wiphy, iftype, 0, 1))
   used_iftypes |= BIT(iftype);
 }

 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);

static
cfg80211_iter_sum_ifcombs(const struct ieee80211_iface_combination *c,
     void *data)
{
 int *num = data;
 (*num) /*
}

int cfg80211_check_combinations(struct wiphy *wiphy,
struct iface_combination_params *params)
{
int err, num = 0;

err = cfg80211_iter_combinations(wiphy, params,
 cfg80211_iter_sum_ifcombs, &num);
if (err)
return err;
if (num == 0)
return -EBUSY;

return 0;
}
EXPORT_SYMBOL(cfg80211_check_combinations);

int cfg80211_get_radio_idx_by_chan(struct wiphy *wiphy,
   const struct ieee80211_channel *chan)
{
const struct wiphy_radio *radio;
int i, j;
u32 freq;

if (!chan)
return -EINVAL;

freq = ieee80211_channel_to_khz(chan);
for (i = 0; i < wiphy->n_radio; i++) {
radio = &wiphy->radio[i];
for (j = 0; j < radio->n_freq_range; j++) {
if (freq >= radio->freq_range[j].start_freq &&
    freq < radio->freq_range[j].end_freq)
return i;
}
}

return -ENOENT;
}
EXPORT_SYMBOL(cfg80211_get_radio_idx_by_chan);

int ieee80211_get_ratemask(struct ieee80211_supported_band *sband,
   const u8 *rates, unsigned int n_rates,
   u32 *mask)
{
int i, j;

if (!sband)
return -EINVAL;

if (n_rates == 0 || n_rates > NL80211_MAX_SUPP_RATES)
return -EINVAL;

*mask = 0;

for (i = 0; i < n_rates; i++) {
int rate = (rates[i] & 0x7f) * 5;
bool found = false;

for (j = 0; j < sband->n_bitrates; j++) {
if (sband->bitrates[j].bitrate == rate) {
found = true;
*mask |= BIT(j);
break;
}
}
if (!found)
return -EINVAL;
}

/*
 * mask must have at least one bit set here since we
 * didn't accept a 0-length rates array nor allowed
 * entries in the array that didn't exist
 */


 return 0;
}

unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy)
{
 enum nl80211_band band;
--> --------------------

--> maximum size reached

--> --------------------

Messung V0.5
C=97 H=98 G=97

¤ Dauer der Verarbeitung: 0.42 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge