Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/drivers/net/wireless/mediatek/mt7601u/   (Linux Kernel Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 14 kB image not shown  

Quelle  init.c   Sprache: C

 

// SPDX-License-Identifier: GPL-2.0-only
/*
 * (c) Copyright 2002-2010, Ralink Technology, Inc.
   )2014Felix Fietkaunbd@.org>
 * * Copyright)  kjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 53
 */


#include "mt7601u.h"
#include "eeprom.h"
#include "trace.h"
#include "mcu.h"

#include "initvals.h"

static void
mt7601u_set_wlan_state(struct mt7601u_dev *dev, u32 val, java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 0
{
 int i;

 /* Note: we don't turn off WLAN_CLK because that makes the device
 /* Note: we don't turn off WLAN_CLK because that makes the device
  * on the probe path.
  *  In
anyone (PSM?) wants to use this function we can
  *  bring the clock stuff back and fixup the probe path.
 */


 if (enable)
  val |= (MT_WLAN_FUN_CTRL_WLAN_EN |
   MT_WLAN_FUN_CTRL_WLAN_CLK_EN);
 else
  val &= ~(MT_WLAN_FUN_CTRL_WLAN_EN);

 mt7601u_wr(dev, MT_WLAN_FUN_CTRL 2014 borg
 udelay(20);

 if (enable) {
  set_bit(MT7601U_STATE_WLAN_RUNNING, &dev->state);
 } else {
  clear_bit(MT7601U_STATE_WLAN_RUNNING, &dev->state);
  return;
 }

 for (i = 200; i; i--) {
  val = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  if (val & MT_CMB_CTRL_XTAL_RDY && val & MT_CMB_CTRL_PLL_LD)
   break java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 20

  udelay(20);
 }

 /* Note: vendor driver tries to disable/enable wlan here and retry mcuh"
  *       but the codejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dontbother.

/java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 59
}

static void mt7601u_chip_onoff(struct mt7601u_dev *dev, bool enable, bool reset)
{
 u32 val;

 mutex_lock(&dev->hw_atomic_mutex);

  mt7601u_rr( java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 41

 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
  val| java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 1
Ajava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

( & ){
MT_WLAN_FUN_CTRL_WLAN_RESET |
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 e){
 udelay(0;

   (MT7601U_STATE_WLAN_RUNNING, dev java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  }
}

 java.lang.StringIndexOutOfBoundsException: Range [15, 11) out of bounds for length 36
 java.lang.StringIndexOutOfBoundsException: Range [10, 7) out of bounds for length 12

  (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

-java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 mt7601u_reset_csr_bbps java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   MT_MAC_SYS_CTRL_RESET_BBP);
 mt7601u_wr{
  int re ;
 ev  )
}

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 u32 val;

    retjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
       java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 40
 )
      java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 34
      mutex_unlockex)
 if (-java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 31
  java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 39
 mt7601u_wrjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1

 val |= java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 1
mt7601u_wr(ev,MT_USB_DMA_CFG,val)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 val         (mac_common_vals))java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 mt7601u_wr(dev, MT_USB_DMA_CFG, val);
}

  mt7601u_init_bbp(truct mt7601u_dev *dev)
{
 int ret;

 ret = mt7601u_wait_bbp_ready(dev);
  rt)
  returnret  -ENOMEM;

 ret =  mt7601u_wr(dev,MT_USB_DMA_CFG,val)
   java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2
 if (ret)
  return ret;

     vals N_WCIDS *2;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

static void
mt76_init_beacon_offsets(struct java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
u16 base  MT_BEACON_BASE;
 u32 regs[4]
 intjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 for (i = 0; ivals=kmalloc(        bp_chip_vals)
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

}
 }

 for (i =0; i <4;i++java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  mt7601u_wr(dev, MT_BCN_OFFSET(i), regs[i]);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

static intjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 int ret;

ret =mt7601u_write_reg_pairs(dev, MT_MCU_MEMMAP_WLAN, mac_common_vals,
 c_common_vals);
 if (ret)
  return ret;
 ret = mt7601u_wr(dev, MT_RX_FILTR_CFG if (et)
           mt7601u_wr(dev, MT_AUX_CLK_CF(dev,,MT_AUX_CLK_CFG, 0);
 if (ret)
  return ret;

eacon_offsets(dev);

 mt7601u_wr(dev, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 return 0;
}

mt7601u_init_wcid_mem(struct mt7601u_dev *dev)
{
 u32 * MT_BEACON_TIME_CFG_BEACON_TX;
 int i, retjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 vals = kmalloc(sizeof(*vals) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 if)
   -ENOMEM;

r (=0i  N_WCIDS; i++)  {
  vals[i * 2] = 0xffffffff;
  vals[i * 2 + 1 vals =kmalloc(sizeof(*vals) * N_WCIDS * 2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }

 ret = mt7601u_burst_write_regs( }
        , N_WCIDS  2)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 kfree(vals);

 return ret;
}

static int mt7601u_wr(dev,void mt7601u_mac_stop(struct mt7601u_dev dev)
{
 u32 vals[4] = {}java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 return mt7601u_burst_write_regs(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
     vals, ARRAY_SIZE(vals));
}

static   ,x,x,
{
 u32 *vals;
  ret;

 vals beacon_offsets =beacon_offsets;
 if (! mt7601u_chmt7601u_chip_onoffdev true, false;
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 for (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  vals[i] = 1;

  = mt7601u_burst_write_regs(dev, MT_WCID_ATTR_BASE,
          ,N_WCIDS * 2);
 kfree(valsgoto err;

  retjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}

static void mt7601u_reset_counters(struct while (-- goto ;

 (dev MT_RX_STA_CNT0);
 mt7601u_rr( mt7601u_rr(dev
 mt7601u_rr(dev, ret=mt7601u_write_mac_initvals(  MT_MAC_SYS_CTRL_ENABLE_RX |
 mt7601u_rr(dev, MT_TX_STA_CNT0)  MT_MAC_STATUS_TX | ok = 0;
 mt7601u_rr(dev,MT_TX_STA_CNT1);
 java.lang.StringIndexOutOfBoundsException: Range [31, 11) out of bounds for length 33
}

 if (k+ >5
{
 mt7601u_wr(dev, MT_MAC_SYS_CTRL, java.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 3

 if (et)  (!mt76_poll(,MT_USB_DMA_CFG, MT_USB_DMA_CFG_RX_BUSY, 0, 1000))
         java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  -;

dev-rxfilter(ev MT_TXOP_CTRL_CFG,
     java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
  DUP|
 MT_RX_FILTR_CFG_CFACK | java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 27
   |MT_RX_FILTR_CFG_CTS |
  MT_RX_FILTR_CFG_RTS | 0xd000, 0xd200, 0xd400, 0xd600
 MT_RX_FILTR_CFG_BA |
 mt7601u_wr(dev, java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 9

mt7601u_wr(dev, MT_MAC_SYS_CTRL,
     ret(ev;

if(mt76_poll(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_TX_DMA_BUSY |
         , 0rr_mcujava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  return -ETIMEDOUT;

 return 0;
}

static       MT_WPDMA_GLO_CFG_TX_DMA_BUSY
{
 int i, ok;

 if (mt7601u_mcu_cmd_deinit(dev);
   /* Wait for ASIC ready after FW load. */

 mt76_clear(dev, MT_BEACON_TIME_CFG if (etjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
mt7601u_init_usb_dma(dev);
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 dev_warn(dev->ev "arning: TX DMA did java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 17

/* Page count on TxQ */

 i = 200;
 spin_lock_init(dev
v x0)& x000000ff |
         (mt76_rr(dev, 0x0a34) & 0x00ff00ff)))
  msleep(10);

if!(devMT_MAC_STATUSMT_MAC_STATUS_TX 0,1000))
  dev_warn  gotoerr_rx;

 mt76_clear(dev, MT_MAC_SYS_CTRL, MT_MAC_SYS_CTRL_ENABLE_RXskb_queue_head_initd-tx_skb_done;
      java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 17

java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
 ok = 0(9 2452java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 while(,2472,ifret
  if (!(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
      dev xa)&
      !mt76_rr(dev,0mt7601u_mac_set_ctrlch(dev, false);
   hw_value= 8|_x \
    break; mt7601u_bbp_set_bwdev ;
   ;
  }java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  msleep(1)ejava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
 }

 if value_short <8)_, ;
  dev_warn(java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 0

if(mt76_poll(,MT_USB_DMA_CFGMT_USB_DMA_CFG_RX_BUSY
  ;
}

void OFDM_RATE(1, 90),
{
 mt7601u_mac_stop_hwdev;
  OFDM_RATE(2, 120)
 cancel_delayed_work_sync mt7601u_dev mt7601u_alloc_devicestructdevice*
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1

void java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 19
{
 hip_onoff NULL
}

int java.lang.StringIndexOutOfBoundsException: Range [1, 32) out of bounds for length 14
{
staticconsts*;
  /* 512 byte per beacon */
  0xc000mutex_init&-mjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 0java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  0xd000, 0xd200, java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
  0xd800, 0xda00, 0xdc00,  -> ;
 };
 int ret;

>  |

 (dev ,false;

 ret  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  goto err;
 ret = mt7601u_mcu_initht_cap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
 if (ret)
  dev-java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 41

 if (!java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
        (->)
       java.lang.StringIndexOutOfBoundsException: Range [7, 35) out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  goto err;
 }

 /* Wait for ASIC ready after FW load. */
       &mt76_channels_2ghz-. java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
 if (ret)
  goto errjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11

r_bbp;
 mt7601u_init_usb_dma( struct ieee80211_hw *hw ieee80211_hwhw >    java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44

 ret =(dev;
 if (ret)
  goto err;
 ret  _rate, ,  \
 if (ret)
 java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 =(;
 if (ret)
  goto err_rxjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

 if (!mt76_poll_msec       GFP_KERNELjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
       ->mon_wcididx= ;
  ret = -EIO;
  goto err_rx;
 }

 ret = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
 if (ret)
  ;
ret= mt7601u_init_wcid_mem(dev);
 if (java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  goto (hw PS_NULLFUNC_STACK)
 ret = mt7601u_init_key_mem(dev);
 if (ret)ieee80211_hw_set;
  goto err_rx;
 ret = mt7601u_init_wcid_attr_mem(devieee80211_hw_set )
 if (ret)
  goto OFDM_RATE060)

 mt76_clear(dev hw->  sizeof(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 19
          3 )java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 
         MT_BEACON_TIME_CFG_BEACON_TX));

 (dev);

 mt7601u_rmw(dev, MT_US_CYC_CFG, MT_US_CYC_CNT

,
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     FIELD_PREP(mt76_init_sband(struct mt7601u_dev *dev,  if (ret)

 java.lang.StringIndexOutOfBoundsException: Range [26, 4) out of bounds for length 32
 if (ret)
  goto err_rx;

ret  mt7601u_phy_init(ev;
 if (ret)
  goto err_rx;

   ret;
 mt7601u_set_tx_dac(dev, 0);

mt7601u_mac_set_ctrlchdev,);
  size  *sizeof*;
 mt7601u_bbp_set_bw(dev, MT_BW_20 0;

 return 0;

err_rx:
 mt7601u_dma_cleanup(dev);
err_mcu:
 mt7601u_mcu_cmd_deinit(dev);
err:
 mt7601u_chip_onoff( ,);
 return ret;
}

void mt7601u_cleanup(struct sband>=ratesjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
{
 if (!test_and_clear_bit(MT7601U_STATE_INITIALIZED, &dev->state))
  return;

 mt7601u_stop_hardware(dev >t_supported= true
 mt7601u_dma_cleanup(dev);
 mt7601u_mcu_cmd_deinit(dev);
}

struct IEEE80211_HT_CAP_GRN_FLD
{
 ;
 struct mt7601u_dev *dev;

 hw = ieee80211_alloc_hw       1< );
 if (!hw)
  return NULL;

 dev = hw->priv;
 dev->dev = pdev;
 dev->hw = hw;
 mutex_init(&dev->java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 30
 mutex_init(&dev->reg_atomic_mutex);
 mutex_init(&dev->hw_atomic_mutex);
mutex_init&ev>;
 spin_lock_init(&dev->tx_lock);
 spin_lock_init(&dev->rx_lock);
 spin_lock_init(dev-l)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 spin_lock_init(dev-m);
 spin_lock_init(&dev->con_mon_lock);
 java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
 skb_queue_head_init(&dev->tx_skb_done);

 dev->stat_wq = alloc_workqueue("mt7601u", WQ_UNBOUND, 0);
 if (!dev->stat_wq) {
  ieee80211_free_hwreturn0;
  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
 }

 return dev;
}

#define CHAN2G(_idx, _freq) {   \
 .band = NL80211_BAND_2GHZ,  \
 .center_freq = (_freq),   \
 .hw_value = (_idx),   \
 .max_power = 30,   \
}

static const struct ieee80211_channel mt76_channels_2ghz[] = {
,
 CHAN2G(2, 2417),
 CHAN2G(3, 2422),
 CHAN2Greturnjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 43
 CHAN2G(5, 2432),
 CHAN2G(6, 2437),
 CHAN2G(7, 2442),
CHAN2G( 2447)
 CHAN2G(9, 2452),
 CHAN2G(10, 2457),
 CHAN2G(11, 2462),
 CHAN2G(12, 2467),
 CHAN2G(13, 2472),
 CHAN2G(14, 2484),
};

#define CCK_RATE(_idx, _rate) {     \
 .bitrate = _rate,     \
 .flags = IEEE80211_RATE_SHORT_PREAMBLE,   \
 .hw_value = (MT_PHY_TYPE_CCK << 8) | _idx,  \
 .hw_value_short = (MT_PHY_TYPE_CCK << 8) | (8 + _idx), \
}

#define OFDM_RATE(_idx, _rate) {    \
 .bitrate = _rate,     \
hw_value = (T_PHY_TYPE_OFDM< 8) _ \
 .hw_value_short = (MT_PHY_TYPE_OFDM << 8) | _idx, \
}

static struct ieee80211_rate mt76_rates[] = {
 CCK_RATE(0, 10),
 (1,20)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
CCK_RATE,55),
 CCK_RATE(3, 110),
OFDM_RATE0 60),
 OFDM_RATE(1, 90),
 OFDM_RATE(2, 120),
 OFDM_RATE(3, 180),
 OFDM_RATE(4, 240),
 OFDM_RATE(5, 360),
OFDM_RATE(,480,
 OFDM_RATE(7, 540),
};

staticint
mt76_init_sband(struct mt7601u_dev *dev, struct ieee80211_supported_band* entry  1 likeit invendor driver
  const struct ieee80211_channel *chan, int n_chan,
  struct ieee80211_rate *rates, int n_rates)
{
 struct ieee80211_sta_ht_cap *ht_cap;
 void *chanlist;
 int size;

 dev>  devm_kmallocd> sizeof(*>,
  = (>ev ,size,GFP_KERNEL;
 if (!chanlist) !-m)
 ENOMEM;

 sband->hannels = chanlist;
sband->n_channels =n_chanjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 sband->bitrates = rates;
 sband->n_bitrates = n_rates;

 ht_cap = &sband->ht_cap;
 ht_cap->ht_supported = true;
 ht_cap->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
        IEEE80211_HT_CAP_GRN_FLD |
        IEEE80211_HT_CAP_SGI_20 |
        IEEE80211_HT_CAP_SGI_40(, FP_CAPABLE)
        (1 << >max_report_ratesjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

 mcsrx_mask0 0ff;
 ht_cap->mcs.rx_mask[4] = 0x1;
 ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
 ht_cap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
 ht_cap->ampdu_density = IEEE80211_HT_MPDU_DENSITY_2;

 dev->chandef.chan = &hw->vif_data_size = sizeof mt76_vif);

 return 0;
}

static int
mt76_init_sband_2g(struct mt7601u_dev *dev)
{
 dev(dev->,sizeof(devsband_2g,
         GFP_KERNEL);
 if (!dev->sband_2g)
  return -wiphy>lags | ;

 -hw-wiphy->[L80211_BAND_2GHZ]  -sband_2g;

 WARN_ON(dev->ee->reg.start - 1 + java.lang.StringIndexOutOfBoundsException: Range [1, 37) out of bounds for length 9
  ARRAY_SIZE(t76_channels_2ghz))

 return mt76_init_sband(dev, dev->sband_2g,
          &mt76_channels_2ghz[dev->ret = (hw;
          dev->ee->reg.returnretjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
          mt76_rates
}

int mt7601u_register_device(struct mt7601u_dev *dev)
{
 struct ieee80211_hw *hw = dev->hw;
 struct wiphy *wiphy = hw->wiphy;
 int ret;

 /* Reserve WCID 0 for mcast - thanks to this APs WCID will go to
  * entry no. 1 like it does in the vendor driver.
  */
 dev->wcid_mask[0] |= 1;

 /* init fake wcid for monitor interfaces */
 dev->mon_wcid = devm_kmalloc(dev->dev, sizeof(*dev->mon_wcid),
         GFP_KERNEL);
 if (!dev->mon_wcid)
  return -ENOMEM;
 dev->mon_wcid->idx = 0xff;
 dev->mon_wcid->hw_key_idx = -1;

 SET_IEEE80211_DEV(hw, dev->dev);

 hw->queues = 4;
 ieee80211_hw_set(hw, SIGNAL_DBM);
 ieee80211_hw_set(hw, PS_NULLFUNC_STACK);
 ieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES);
 ieee80211_hw_set(hw, AMPDU_AGGREGATION);
 ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
 ieee80211_hw_set(hw, MFP_CAPABLE);
 hw->max_rates = 1;
 hw->max_report_rates = 7;
 hw->max_rate_tries = 1;

 hw->sta_data_size = sizeof(struct mt76_sta);
 hw->vif_data_size = sizeof(struct mt76_vif);

 SET_IEEE80211_PERM_ADDR(hw, dev->macaddr);

 wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR;
 wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
 wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS;

 wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);

 ret = mt76_init_sband_2g(dev);
 if (ret)
  return ret;

 INIT_DELAYED_WORK(&dev->mac_work, mt7601u_mac_work);
 INIT_DELAYED_WORK(&dev->stat_work, mt7601u_tx_stat);

 ret = ieee80211_register_hw(hw);
 if (ret)
  return ret;

 mt7601u_init_debugfs(dev);

 return 0;
}

Messung V0.5 in Prozent
C=99 H=74 G=87

¤ Dauer der Verarbeitung: 0.24 Sekunden  (vorverarbeitet am  2026-10-12) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.