63 rtl_write_word(rtlpriv,
REG_DBI_CTRL, ((offset & 0xFFC) | 0xF000));
79 static void _rtl92de_stop_tx_beacon(
struct ieee80211_hw *hw)
89 tmp1byte &= ~(
BIT(0));
93 static void _rtl92de_resume_tx_beacon(
struct ieee80211_hw *hw)
107 static void _rtl92de_enable_bcn_sub_func(
struct ieee80211_hw *hw)
109 _rtl92de_set_bcn_ctrl_reg(hw, 0,
BIT(1));
112 static void _rtl92de_disable_bcn_sub_func(
struct ieee80211_hw *hw)
114 _rtl92de_set_bcn_ctrl_reg(hw,
BIT(1), 0);
137 *((
bool *) (val)) =
true;
139 val_rcr = rtl_read_dword(rtlpriv,
REG_RCR);
140 val_rcr &= 0x00070000;
142 *((
bool *) (val)) =
false;
144 *((
bool *) (val)) =
true;
156 *ptsf_high = rtl_read_dword(rtlpriv, (
REG_TSFTR + 4));
157 *ptsf_low = rtl_read_dword(rtlpriv,
REG_TSFTR);
162 *((
bool *)(val)) = rtlpriv->
dm.interrupt_migration;
165 *((
bool *)(
val)) = rtlpriv->
dm.disable_tx_int;
169 "switch case not processed\n");
186 for (idx = 0; idx <
ETH_ALEN; idx++) {
187 rtl_write_byte(rtlpriv, (
REG_MACID + idx),
192 u16 rate_cfg = ((
u16 *) val)[0];
195 rate_cfg = rate_cfg & 0x15f;
197 ((rate_cfg & 0x150) == 0))
199 rtl_write_byte(rtlpriv,
REG_RRSR, rate_cfg & 0xff);
200 rtl_write_byte(rtlpriv,
REG_RRSR + 1,
201 (rate_cfg >> 8) & 0xff);
202 while (rate_cfg > 0x1) {
203 rate_cfg = (rate_cfg >> 1);
212 for (idx = 0; idx <
ETH_ALEN; idx++) {
213 rtl_write_byte(rtlpriv, (
REG_BSSID + idx),
233 "HW_VAR_SLOT_TIME %x\n", val[0]);
234 rtl_write_byte(rtlpriv,
REG_SLOT, val[0]);
235 for (e_aci = 0; e_aci <
AC_MAX; e_aci++)
236 rtlpriv->
cfg->ops->set_hw_reg(hw,
243 u8 short_preamble = (
bool) (*val);
248 rtl_write_byte(rtlpriv,
REG_RRSR + 2, reg_tmp);
252 u8 min_spacing_to_set;
255 min_spacing_to_set = *
val;
256 if (min_spacing_to_set <= 7) {
258 if (min_spacing_to_set < sec_min_space)
259 min_spacing_to_set = sec_min_space;
262 *val = min_spacing_to_set;
264 "Set HW_VAR_AMPDU_MIN_SPACE: %#x\n",
274 density_to_set = *
val;
278 "Set HW_VAR_SHORTGI_DENSITY: %#x\n",
291 regtoSet = 0xb9726641;
293 regtoSet = 0x66626641;
295 regtoSet = 0xb972a841;
297 if (factor_toset <= 3) {
298 factor_toset = (1 << (factor_toset + 2));
299 if (factor_toset > 0xf)
301 for (index = 0; index < 4; index++) {
302 ptmp_byte = (
u8 *) (®toSet) +
index;
303 if ((*ptmp_byte & 0xf0) >
305 *ptmp_byte = (*ptmp_byte & 0x0f)
306 | (factor_toset << 4);
307 if ((*ptmp_byte & 0x0f) > factor_toset)
308 *ptmp_byte = (*ptmp_byte & 0xf0)
313 "Set HW_VAR_AMPDU_FACTOR: %#x\n",
330 u8 acm = p_aci_aifsn->
f.acm;
333 acm_ctrl = acm_ctrl | ((rtlpci->
acm_method == 2) ? 0x0 : 0x1);
347 "HW_VAR_ACM_CTRL acm set failed: eACI is %d\n",
364 "switch case not processed\n");
369 "SetHwReg8190pci(): [HW_VAR_ACM_CTRL] Write 0x%X\n",
375 rtl_write_dword(rtlpriv,
REG_RCR, ((
u32 *) (val))[0]);
379 u8 retry_limit = val[0];
381 rtl_write_word(rtlpriv,
REG_RL,
411 u8 tmp_regcr, tmp_reg422;
412 bool recover =
false;
415 rtlpriv->
cfg->ops->set_hw_reg(hw,
417 tmp_regcr = rtl_read_byte(rtlpriv,
REG_CR + 1);
418 rtl_write_byte(rtlpriv,
REG_CR + 1,
419 (tmp_regcr |
BIT(0)));
420 _rtl92de_set_bcn_ctrl_reg(hw, 0,
BIT(3));
421 _rtl92de_set_bcn_ctrl_reg(hw,
BIT(4), 0);
422 tmp_reg422 = rtl_read_byte(rtlpriv,
424 if (tmp_reg422 &
BIT(6))
427 tmp_reg422 & (~
BIT(6)));
429 _rtl92de_set_bcn_ctrl_reg(hw,
BIT(3), 0);
430 _rtl92de_set_bcn_ctrl_reg(hw, 0,
BIT(4));
432 rtl_write_byte(rtlpriv,
435 rtl_write_byte(rtlpriv,
REG_CR + 1,
436 (tmp_regcr & ~(
BIT(0))));
450 u8 btype_ibss = val[0];
453 _rtl92de_stop_tx_beacon(hw);
454 _rtl92de_set_bcn_ctrl_reg(hw, 0,
BIT(3));
456 (
u32) (mac->
tsf & 0xffffffff));
458 (
u32) ((mac->
tsf >> 32) & 0xffffffff));
459 _rtl92de_set_bcn_ctrl_reg(hw,
BIT(3), 0);
461 _rtl92de_resume_tx_beacon(hw);
466 bool int_migration = *(
bool *) (val);
474 rtlpriv->
dm.interrupt_migration = int_migration;
478 rtlpriv->
dm.interrupt_migration = int_migration;
483 bool disable_ac_int = *((
bool *) val);
486 if (disable_ac_int) {
492 rtlpriv->
cfg->ops->update_interrupt_mask(hw, 0,
494 rtlpriv->
dm.disable_tx_int = disable_ac_int;
497 rtlpriv->
cfg->ops->update_interrupt_mask(hw,
499 rtlpriv->
dm.disable_tx_int = disable_ac_int;
505 "switch case not processed\n");
525 "Failed to polling write LLT done at address %d!\n",
534 static bool _rtl92de_llt_table_init(
struct ieee80211_hw *hw)
548 value32 = 0x80bf0d29;
553 value32 = 0x80750005;
560 rtl_write_dword(rtlpriv,
REG_RQPN, value32);
570 rtl_write_byte(rtlpriv,
REG_TDECTRL + 1, txpktbuf_bndy);
579 rtl_write_byte(rtlpriv, 0x45D, txpktbuf_bndy);
585 rtl_write_byte(rtlpriv,
REG_PBP, 0x11);
591 for (i = 0; i < (txpktbuf_bndy - 1); i++) {
592 status = _rtl92de_llt_write(hw, i, i + 1);
598 status = _rtl92de_llt_write(hw, (txpktbuf_bndy - 1), 0xFF);
606 for (i = txpktbuf_bndy; i < maxPage; i++) {
607 status = _rtl92de_llt_write(hw, i, (i + 1));
613 status = _rtl92de_llt_write(hw, maxPage, txpktbuf_bndy);
620 static void _rtl92de_gen_refresh_led_state(
struct ieee80211_hw *hw)
641 unsigned char bytetmp;
642 unsigned short wordtmp;
678 while ((bytetmp &
BIT(0)) && retry < 1000) {
698 rtl_write_word(rtlpriv,
REG_CR, 0x0);
701 rtl_write_word(rtlpriv,
REG_CR, 0x2ff);
710 if (!_rtl92de_llt_table_init(hw))
716 rtl_write_dword(rtlpriv,
REG_HISR, 0xffffffff);
717 rtl_write_byte(rtlpriv,
REG_HISRE, 0xff);
757 rtl_write_byte(rtlpriv, 0x4d0, 0x0);
786 }
while ((retry < 200) && !(bytetmp &
BIT(7)));
789 _rtl92de_gen_refresh_led_state(hw);
797 static void _rtl92de_hw_configure(
struct ieee80211_hw *hw)
808 rtl_write_dword(rtlpriv,
REG_RRSR, reg_rrsr);
809 rtl_write_byte(rtlpriv,
REG_SLOT, 0x09);
812 rtl_write_word(rtlpriv,
REG_RL, 0x0707);
815 rtl_write_dword(rtlpriv,
REG_DARFRC, 0x01000000);
816 rtl_write_dword(rtlpriv,
REG_DARFRC + 4, 0x07060504);
817 rtl_write_dword(rtlpriv,
REG_RARFRC, 0x01000000);
818 rtl_write_dword(rtlpriv,
REG_RARFRC + 4, 0x07060504);
831 rtl_write_byte(rtlpriv,
REG_PIFS, 0x1C);
837 rtl_write_byte(rtlpriv,
REG_ACKTO, 0x40);
846 rtl_write_dword(rtlpriv,
REG_MAR, 0xffffffff);
847 rtl_write_dword(rtlpriv,
REG_MAR + 4, 0xffffffff);
848 switch (rtlpriv->
phy.rf_type) {
860 static void _rtl92de_enable_aspm_back_door(
struct ieee80211_hw *hw)
865 rtl_write_byte(rtlpriv, 0x34b, 0x93);
866 rtl_write_word(rtlpriv, 0x350, 0x870c);
867 rtl_write_byte(rtlpriv, 0x352, 0x1);
869 rtl_write_byte(rtlpriv, 0x349, 0x1b);
871 rtl_write_byte(rtlpriv, 0x349, 0x03);
872 rtl_write_word(rtlpriv, 0x350, 0x2718);
873 rtl_write_byte(rtlpriv, 0x352, 0x1);
882 "PairwiseEncAlgorithm = %d GroupEncAlgorithm = %d\n",
883 rtlpriv->
sec.pairwise_enc_algorithm,
884 rtlpriv->
sec.group_enc_algorithm);
885 if (rtlpriv->
cfg->mod_params->sw_crypto || rtlpriv->
sec.use_sw_sec) {
887 "not open hw encryption\n");
891 if (rtlpriv->
sec.use_defaultkey) {
896 rtl_write_byte(rtlpriv,
REG_CR + 1, 0x02);
898 "The SECR-value %x\n", sec_reg_value);
910 bool rtstatus =
true;
922 rtstatus = _rtl92de_init_mac(hw);
933 "Failed to download FW. Init HW without FW..\n");
937 rtlpriv->
psc.fw_current_inpsmode =
false;
939 tmp_u1b = rtl_read_byte(rtlpriv, 0x605);
940 tmp_u1b = tmp_u1b | 0x30;
941 rtl_write_byte(rtlpriv, 0x605, tmp_u1b);
945 "EarlyMode Enabled!!!\n");
947 tmp_u1b = rtl_read_byte(rtlpriv, 0x4d0);
948 tmp_u1b = tmp_u1b | 0x1f;
949 rtl_write_byte(rtlpriv, 0x4d0, tmp_u1b);
951 rtl_write_byte(rtlpriv, 0x4d3, 0x80);
953 tmp_u1b = rtl_read_byte(rtlpriv, 0x605);
954 tmp_u1b = tmp_u1b | 0x40;
955 rtl_write_byte(rtlpriv, 0x605, tmp_u1b);
1007 _rtl92de_hw_configure(hw);
1022 _rtl92de_enable_aspm_back_door(hw);
1033 for (i = 0; i < 10000; i++) {
1036 tmp_rega = rtl_get_rfreg(hw,
1040 if (((tmp_rega &
BIT(11)) ==
BIT(11)))
1061 if (!(value32 & 0x000f0000)) {
1071 static int _rtl92de_set_media_status(
struct ieee80211_hw *hw,
1075 u8 bt_msr = rtl_read_byte(rtlpriv,
MSR);
1083 _rtl92de_stop_tx_beacon(hw);
1084 _rtl92de_enable_bcn_sub_func(hw);
1087 _rtl92de_resume_tx_beacon(hw);
1088 _rtl92de_disable_bcn_sub_func(hw);
1091 "Set HW_VAR_MEDIA_STATUS: No such media status(%x)\n",
1099 bcnfunc_enable &= 0xF7;
1101 "Set Network type to NO LINK!\n");
1105 bcnfunc_enable |= 0x08;
1107 "Set Network type to Ad Hoc!\n");
1112 bcnfunc_enable &= 0xF7;
1114 "Set Network type to STA!\n");
1118 bcnfunc_enable |= 0x08;
1120 "Set Network type to AP!\n");
1124 "Network type %d not supported!\n", type);
1129 rtl_write_byte(rtlpriv,
REG_CR + 2, bt_msr);
1130 rtlpriv->
cfg->ops->led_control(hw, ledaction);
1131 if ((bt_msr & 0xfc) ==
MSR_AP)
1144 if (rtlpriv->
psc.rfpwr_state !=
ERFON)
1149 _rtl92de_set_bcn_ctrl_reg(hw, 0,
BIT(4));
1150 }
else if (!check_bssid) {
1152 _rtl92de_set_bcn_ctrl_reg(hw,
BIT(4), 0);
1161 if (_rtl92de_set_media_status(hw, type))
1188 "Do IQK for channel:%d\n", channel);
1213 RT_ASSERT(
false,
"invalid aci: %d !\n", aci);
1237 static void _rtl92de_poweroff_adapter(
struct ieee80211_hw *hw)
1241 unsigned long flags;
1243 rtlpriv->
intf_ops->enable_aspm(hw);
1271 0x00FF0000 | (u1b_tmp << 8));
1304 "In PowerOff,reg0x%x=%X\n",
1313 u1b_tmp &= (~
BIT(7));
1331 _rtl92de_set_media_status(hw, opmode);
1367 if (rtlpriv->
rtlhal.interfaceindex == 1)
1375 rtl_write_byte(rtlpriv,
REG_CR, 0x0);
1378 _rtl92de_poweroff_adapter(hw);
1383 u32 *p_inta,
u32 *p_intb)
1388 *p_inta = rtl_read_dword(rtlpriv,
ISR) & rtlpci->
irq_mask[0];
1389 rtl_write_dword(rtlpriv,
ISR, *p_inta);
1401 u16 bcn_interval, atim_window;
1406 rtl_write_word(rtlpriv,
REG_ATIMWND, atim_window);
1414 rtl_write_byte(rtlpriv, 0x606, 0x30);
1424 "beacon_interval:%d\n", bcn_interval);
1446 static void _rtl92de_readpowervalue_fromprom(
struct txpower_info *pwrinfo,
1447 u8 *rom_content,
bool autoLoadfail)
1477 for (i = 0; i < 3; i++) {
1491 (rom_content[eeaddr] == 0xFF) ?
1495 rom_content[eeaddr];
1500 offset1 = group / 3;
1501 offset2 = group % 3;
1503 offset2 + offset1 * 21;
1505 (rom_content[eeaddr] == 0xFF) ? (eeaddr > 0x7B ?
1508 rom_content[eeaddr];
1516 offset1 = group / 3;
1517 offset2 = group % 3;
1519 if (rom_content[base1 + offset2 + offset1 * 21] != 0xFF)
1521 (rom_content[base1 +
1522 offset2 + offset1 * 21] >> (rfpath * 4))
1528 + offset1 * 21] != 0xFF)
1531 + offset2 + offset1 * 21] >> (rfpath * 4))
1537 + offset1 * 21] != 0xFF)
1540 + offset2 + offset1 * 21] >> (rfpath * 4))
1546 + offset1 * 21] != 0xFF)
1549 + offset2 + offset1 * 21] >> (rfpath * 4))
1555 + offset1 * 21] != 0xFF)
1558 offset2 + offset1 * 21] >> (rfpath * 4)) &
1581 for (i = 0; i < 3; i++) {
1588 static void _rtl92de_read_txpower_info(
struct ieee80211_hw *hw,
1589 bool autoload_fail,
u8 *hwinfo)
1594 u8 tempval[2],
i, pwr, diff;
1597 _rtl92de_readpowervalue_fromprom(&pwrinfo, hwinfo, autoload_fail);
1598 if (!autoload_fail) {
1614 "Is D cut,Internal PA0 %d Internal PA1 %d\n",
1624 tempval[0] = tempval[1] = 3;
1642 for (i = 0; i < 2; i++) {
1643 switch (tempval[i]) {
1670 "CrystalCap = 0x%x\n", rtlefuse->
crystalcap);
1672 "Delta_IQK = 0x%x Delta_LCK = 0x%x\n",
1694 (pwr > diff) ? (pwr - diff) : 0;
1699 static void _rtl92de_read_macphymode_from_prom(
struct ieee80211_hw *hw,
1706 if (macphy_crvalue &
BIT(3)) {
1709 "MacPhyMode SINGLEMAC_SINGLEPHY\n");
1713 "MacPhyMode DUALMAC_DUALPHY\n");
1717 static void _rtl92de_read_macphymode_and_bandtype(
struct ieee80211_hw *hw,
1720 _rtl92de_read_macphymode_from_prom(hw, content);
1725 static void _rtl92de_efuse_update_chip_version(
struct ieee80211_hw *hw)
1736 chipvalue = (cutvalue[1] << 8) | cutvalue[0];
1737 switch (chipvalue) {
1755 rtlpriv->
rtlhal.version = chipver;
1758 static void _rtl92de_read_adapter_info(
struct ieee80211_hw *hw)
1766 unsigned long flags;
1771 _rtl92de_efuse_update_chip_version(hw);
1778 "RTL819X Not boot from eeprom, check it !!\n");
1783 eeprom_id = *((
u16 *)&hwinfo[0]);
1786 "EEPROM ID(%#x) is invalid!!\n", eeprom_id);
1794 "RTL819X Not boot from eeprom, check it !!\n");
1798 _rtl92de_read_macphymode_and_bandtype(hw, hwinfo);
1807 "EEPROM VID = 0x%4x\n", rtlefuse->
eeprom_vid);
1809 "EEPROM DID = 0x%4x\n", rtlefuse->
eeprom_did);
1817 for (i = 0; i < 6; i += 2) {
1822 for (i = 0; i < 6; i += 2) {
1850 "EEPROM Customer ID: 0x%2x\n", rtlefuse->
eeprom_oemid);
1860 rtlhal->
version = _rtl92de_read_chip_version(hw);
1861 tmp_u1b = rtl_read_byte(rtlpriv,
REG_9346CR);
1863 if (tmp_u1b &
BIT(4)) {
1870 if (tmp_u1b &
BIT(5)) {
1874 _rtl92de_read_adapter_info(hw);
1881 static void rtl92de_update_hal_rate_table(
struct ieee80211_hw *hw,
1894 u8 curtxbw_40mhz = mac->
bw_40;
1905 ratr_value |= (sta->
ht_cap.mcs.rx_mask[1] << 20 |
1906 sta->
ht_cap.mcs.rx_mask[0] << 12);
1907 switch (wirelessmode) {
1909 ratr_value &= 0x00000FF0;
1912 if (ratr_value & 0x0000000c)
1913 ratr_value &= 0x0000000d;
1915 ratr_value &= 0x0000000f;
1918 ratr_value &= 0x00000FF5;
1924 ratr_value &= 0x0007F005;
1928 if (get_rf_type(rtlphy) ==
RF_1T2R ||
1929 get_rf_type(rtlphy) ==
RF_1T1R) {
1930 ratr_mask = 0x000ff005;
1932 ratr_mask = 0x0f0ff005;
1935 ratr_value &= ratr_mask;
1940 ratr_value &= 0x000ff0ff;
1942 ratr_value &= 0x0f0ff0ff;
1946 ratr_value &= 0x0FFFFFFF;
1947 if (nmode && ((curtxbw_40mhz && curshortgi_40mhz) ||
1948 (!curtxbw_40mhz && curshortgi_20mhz))) {
1949 ratr_value |= 0x10000000;
1950 tmp_ratr_value = (ratr_value >> 12);
1951 for (shortgi_rate = 15; shortgi_rate > 0; shortgi_rate--) {
1952 if ((1 << shortgi_rate) & tmp_ratr_value)
1955 shortgi_rate = (shortgi_rate << 12) | (shortgi_rate << 8) |
1956 (shortgi_rate << 4) | (shortgi_rate);
1958 rtl_write_dword(rtlpriv,
REG_ARFR0 + ratr_index * 4, ratr_value);
1963 static void rtl92de_update_hal_rate_mask(
struct ieee80211_hw *hw,
1980 bool shortgi =
false;
1989 curtxbw_40mhz = mac->
bw_40;
1992 macid = sta->
aid + 1;
1998 ratr_bitmap |= (sta->
ht_cap.mcs.rx_mask[1] << 20 |
1999 sta->
ht_cap.mcs.rx_mask[0] << 12);
2000 switch (wirelessmode) {
2003 if (ratr_bitmap & 0x0000000c)
2004 ratr_bitmap &= 0x0000000d;
2006 ratr_bitmap &= 0x0000000f;
2011 if (rssi_level == 1)
2012 ratr_bitmap &= 0x00000f00;
2013 else if (rssi_level == 2)
2014 ratr_bitmap &= 0x00000ff0;
2016 ratr_bitmap &= 0x00000ff5;
2020 ratr_bitmap &= 0x00000ff0;
2029 if (rssi_level == 1)
2030 ratr_bitmap &= 0x00070000;
2031 else if (rssi_level == 2)
2032 ratr_bitmap &= 0x0007f000;
2034 ratr_bitmap &= 0x0007f005;
2038 if (curtxbw_40mhz) {
2039 if (rssi_level == 1)
2040 ratr_bitmap &= 0x000f0000;
2041 else if (rssi_level == 2)
2042 ratr_bitmap &= 0x000ff000;
2044 ratr_bitmap &= 0x000ff015;
2046 if (rssi_level == 1)
2047 ratr_bitmap &= 0x000f0000;
2048 else if (rssi_level == 2)
2049 ratr_bitmap &= 0x000ff000;
2051 ratr_bitmap &= 0x000ff005;
2054 if (curtxbw_40mhz) {
2055 if (rssi_level == 1)
2056 ratr_bitmap &= 0x0f0f0000;
2057 else if (rssi_level == 2)
2058 ratr_bitmap &= 0x0f0ff000;
2060 ratr_bitmap &= 0x0f0ff015;
2062 if (rssi_level == 1)
2063 ratr_bitmap &= 0x0f0f0000;
2064 else if (rssi_level == 2)
2065 ratr_bitmap &= 0x0f0ff000;
2067 ratr_bitmap &= 0x0f0ff005;
2071 if ((curtxbw_40mhz && curshortgi_40mhz) ||
2072 (!curtxbw_40mhz && curshortgi_20mhz)) {
2076 else if (macid == 1)
2084 ratr_bitmap &= 0x000ff0ff;
2086 ratr_bitmap &= 0x0f0ff0ff;
2090 value[0] = (ratr_bitmap & 0x0fffffff) | (ratr_index << 28);
2091 value[1] = macid | (shortgi ? 0x20 : 0x00) | 0x80;
2093 "ratr_bitmap :%x value0:%x value1:%x\n",
2094 ratr_bitmap, value[0], value[1]);
2105 if (rtlpriv->
dm.useramask)
2106 rtl92de_update_hal_rate_mask(hw, sta, rssi_level);
2108 rtl92de_update_hal_rate_table(hw, sta);
2120 sifs_timer = 0x0a0a;
2122 sifs_timer = 0x1010;
2133 bool actuallyset =
false;
2142 spin_unlock_irqrestore(&rtlpriv->
locks.rf_ps_lock, flag);
2146 spin_unlock_irqrestore(&rtlpriv->
locks.rf_ps_lock, flag);
2154 "GPIOChangeRF - HW Radio ON, RF ON\n");
2155 e_rfpowerstate_toset =
ERFON;
2160 "GPIOChangeRF - HW Radio OFF, RF OFF\n");
2161 e_rfpowerstate_toset =
ERFOFF;
2168 spin_unlock_irqrestore(&rtlpriv->
locks.rf_ps_lock, flag);
2174 spin_unlock_irqrestore(&rtlpriv->
locks.rf_ps_lock, flag);
2181 u8 *p_macaddr,
bool is_group,
u8 enc_algo,
2182 bool is_wepkey,
bool clear_all)
2189 bool is_pairwise =
false;
2190 static u8 cam_const_addr[4][6] = {
2191 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
2192 {0x00, 0x00, 0x00, 0x00, 0x00, 0x01},
2193 {0x00, 0x00, 0x00, 0x00, 0x00, 0x02},
2194 {0x00, 0x00, 0x00, 0x00, 0x00, 0x03}
2196 static u8 cam_const_broad[] = {
2197 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
2203 u8 clear_number = 5;
2205 for (idx = 0; idx < clear_number; idx++) {
2212 rtlpriv->
sec.key_len[
idx] = 0;
2231 "switch case not processed\n");
2235 if (is_wepkey || rtlpriv->
sec.use_defaultkey) {
2240 macaddr = cam_const_broad;
2249 "Can not find free hw security cam entry\n");
2259 if (rtlpriv->
sec.key_len[key_index] == 0) {
2261 "delete one entry, entry_id is %d\n",
2268 "The insert KEY length is %d\n",
2271 "The insert KEY is %x %x\n",
2272 rtlpriv->
sec.key_buf[0][0],
2273 rtlpriv->
sec.key_buf[0][1]);
2278 "Pairwise Key content",
2279 rtlpriv->
sec.pairwise_key,
2283 "set Pairwise key\n");
2288 sec.key_buf[key_index]);
2298 rtlpriv->
sec.key_buf[entry_id]);
2303 rtlpriv->
sec.key_buf
2314 rtlpriv->
rtlhal.macphyctl_reg = rtl_read_byte(rtlpriv,
2323 rtlpriv->
rtlhal.macphyctl_reg);