linux/drivers/staging/rtl8188eu/hal/mac_cfg.c
<<
>>
Prefs
   1// SPDX-License-Identifier: GPL-2.0
   2/******************************************************************************
   3 *
   4 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
   5 *
   6 ******************************************************************************/
   7
   8#include "odm_precomp.h"
   9#include "phy.h"
  10
  11/* MAC_REG.TXT */
  12
  13static u32 array_MAC_REG_8188E[] = {
  14                0x026, 0x00000041,
  15                0x027, 0x00000035,
  16                0x428, 0x0000000A,
  17                0x429, 0x00000010,
  18                0x430, 0x00000000,
  19                0x431, 0x00000001,
  20                0x432, 0x00000002,
  21                0x433, 0x00000004,
  22                0x434, 0x00000005,
  23                0x435, 0x00000006,
  24                0x436, 0x00000007,
  25                0x437, 0x00000008,
  26                0x438, 0x00000000,
  27                0x439, 0x00000000,
  28                0x43A, 0x00000001,
  29                0x43B, 0x00000002,
  30                0x43C, 0x00000004,
  31                0x43D, 0x00000005,
  32                0x43E, 0x00000006,
  33                0x43F, 0x00000007,
  34                0x440, 0x0000005D,
  35                0x441, 0x00000001,
  36                0x442, 0x00000000,
  37                0x444, 0x00000015,
  38                0x445, 0x000000F0,
  39                0x446, 0x0000000F,
  40                0x447, 0x00000000,
  41                0x458, 0x00000041,
  42                0x459, 0x000000A8,
  43                0x45A, 0x00000072,
  44                0x45B, 0x000000B9,
  45                0x460, 0x00000066,
  46                0x461, 0x00000066,
  47                0x480, 0x00000008,
  48                0x4C8, 0x000000FF,
  49                0x4C9, 0x00000008,
  50                0x4CC, 0x000000FF,
  51                0x4CD, 0x000000FF,
  52                0x4CE, 0x00000001,
  53                0x4D3, 0x00000001,
  54                0x500, 0x00000026,
  55                0x501, 0x000000A2,
  56                0x502, 0x0000002F,
  57                0x503, 0x00000000,
  58                0x504, 0x00000028,
  59                0x505, 0x000000A3,
  60                0x506, 0x0000005E,
  61                0x507, 0x00000000,
  62                0x508, 0x0000002B,
  63                0x509, 0x000000A4,
  64                0x50A, 0x0000005E,
  65                0x50B, 0x00000000,
  66                0x50C, 0x0000004F,
  67                0x50D, 0x000000A4,
  68                0x50E, 0x00000000,
  69                0x50F, 0x00000000,
  70                0x512, 0x0000001C,
  71                0x514, 0x0000000A,
  72                0x516, 0x0000000A,
  73                0x525, 0x0000004F,
  74                0x550, 0x00000010,
  75                0x551, 0x00000010,
  76                0x559, 0x00000002,
  77                0x55D, 0x000000FF,
  78                0x605, 0x00000030,
  79                0x608, 0x0000000E,
  80                0x609, 0x0000002A,
  81                0x620, 0x000000FF,
  82                0x621, 0x000000FF,
  83                0x622, 0x000000FF,
  84                0x623, 0x000000FF,
  85                0x624, 0x000000FF,
  86                0x625, 0x000000FF,
  87                0x626, 0x000000FF,
  88                0x627, 0x000000FF,
  89                0x652, 0x00000020,
  90                0x63C, 0x0000000A,
  91                0x63D, 0x0000000A,
  92                0x63E, 0x0000000E,
  93                0x63F, 0x0000000E,
  94                0x640, 0x00000040,
  95                0x66E, 0x00000005,
  96                0x700, 0x00000021,
  97                0x701, 0x00000043,
  98                0x702, 0x00000065,
  99                0x703, 0x00000087,
 100                0x708, 0x00000021,
 101                0x709, 0x00000043,
 102                0x70A, 0x00000065,
 103                0x70B, 0x00000087,
 104};
 105
 106bool rtl88eu_phy_mac_config(struct adapter *adapt)
 107{
 108        u32 i;
 109        u32 arraylength;
 110        u32 *ptrarray;
 111
 112        arraylength = ARRAY_SIZE(array_MAC_REG_8188E);
 113        ptrarray = array_MAC_REG_8188E;
 114
 115        for (i = 0; i < arraylength; i += 2)
 116                usb_write8(adapt, ptrarray[i], (u8)ptrarray[i + 1]);
 117
 118        usb_write8(adapt, REG_MAX_AGGR_NUM, MAX_AGGR_NUM);
 119        return true;
 120}
 121