diff options
author | George <george0505@realtek.com> | 2011-02-19 17:29:02 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-21 15:39:57 -0500 |
commit | 18d30067d3b0c7e1362b7a866a9873e03a6d7d62 (patch) | |
tree | 9e8cecdf40832eb6260f6c03d04c5217be6ff042 /drivers/net/wireless/rtlwifi/wifi.h | |
parent | 7ea4724036ed17ec811cb8082af7760f04484ef7 (diff) |
rtlwifi: Add headers for rtl8187cu
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: George <george0505@realtek.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/wifi.h')
-rw-r--r-- | drivers/net/wireless/rtlwifi/wifi.h | 138 |
1 files changed, 134 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h index 35e13eef958..328fb40ad90 100644 --- a/drivers/net/wireless/rtlwifi/wifi.h +++ b/drivers/net/wireless/rtlwifi/wifi.h | |||
@@ -114,6 +114,7 @@ enum hardware_type { | |||
114 | HARDWARE_TYPE_RTL8192CU, | 114 | HARDWARE_TYPE_RTL8192CU, |
115 | HARDWARE_TYPE_RTL8192DE, | 115 | HARDWARE_TYPE_RTL8192DE, |
116 | HARDWARE_TYPE_RTL8192DU, | 116 | HARDWARE_TYPE_RTL8192DU, |
117 | HARDWARE_TYPE_RTL8723U, | ||
117 | 118 | ||
118 | /*keep it last*/ | 119 | /*keep it last*/ |
119 | HARDWARE_TYPE_NUM | 120 | HARDWARE_TYPE_NUM |
@@ -121,6 +122,10 @@ enum hardware_type { | |||
121 | 122 | ||
122 | #define IS_HARDWARE_TYPE_8192CE(rtlhal) \ | 123 | #define IS_HARDWARE_TYPE_8192CE(rtlhal) \ |
123 | (rtlhal->hw_type == HARDWARE_TYPE_RTL8192CE) | 124 | (rtlhal->hw_type == HARDWARE_TYPE_RTL8192CE) |
125 | #define IS_HARDWARE_TYPE_8192CU(rtlhal) \ | ||
126 | (rtlhal->hw_type == HARDWARE_TYPE_RTL8192CU) | ||
127 | #define IS_HARDWARE_TYPE_8723U(rtlhal) \ | ||
128 | (rtlhal->hw_type == HARDWARE_TYPE_RTL8723U) | ||
124 | 129 | ||
125 | enum scan_operation_backup_opt { | 130 | enum scan_operation_backup_opt { |
126 | SCAN_OPT_BACKUP = 0, | 131 | SCAN_OPT_BACKUP = 0, |
@@ -363,6 +368,8 @@ enum rtl_var_map { | |||
363 | EFUSE_LOADER_CLK_EN, | 368 | EFUSE_LOADER_CLK_EN, |
364 | EFUSE_ANA8M, | 369 | EFUSE_ANA8M, |
365 | EFUSE_HWSET_MAX_SIZE, | 370 | EFUSE_HWSET_MAX_SIZE, |
371 | EFUSE_MAX_SECTION_MAP, | ||
372 | EFUSE_REAL_CONTENT_SIZE, | ||
366 | 373 | ||
367 | /*CAM map */ | 374 | /*CAM map */ |
368 | RWCAM, | 375 | RWCAM, |
@@ -509,6 +516,17 @@ enum wireless_mode { | |||
509 | WIRELESS_MODE_N_5G = 0x20 | 516 | WIRELESS_MODE_N_5G = 0x20 |
510 | }; | 517 | }; |
511 | 518 | ||
519 | #define IS_WIRELESS_MODE_A(wirelessmode) \ | ||
520 | (wirelessmode == WIRELESS_MODE_A) | ||
521 | #define IS_WIRELESS_MODE_B(wirelessmode) \ | ||
522 | (wirelessmode == WIRELESS_MODE_B) | ||
523 | #define IS_WIRELESS_MODE_G(wirelessmode) \ | ||
524 | (wirelessmode == WIRELESS_MODE_G) | ||
525 | #define IS_WIRELESS_MODE_N_24G(wirelessmode) \ | ||
526 | (wirelessmode == WIRELESS_MODE_N_24G) | ||
527 | #define IS_WIRELESS_MODE_N_5G(wirelessmode) \ | ||
528 | (wirelessmode == WIRELESS_MODE_N_5G) | ||
529 | |||
512 | enum ratr_table_mode { | 530 | enum ratr_table_mode { |
513 | RATR_INX_WIRELESS_NGB = 0, | 531 | RATR_INX_WIRELESS_NGB = 0, |
514 | RATR_INX_WIRELESS_NG = 1, | 532 | RATR_INX_WIRELESS_NG = 1, |
@@ -694,6 +712,25 @@ struct rtl_rfkill { | |||
694 | bool rfkill_state; /*0 is off, 1 is on */ | 712 | bool rfkill_state; /*0 is off, 1 is on */ |
695 | }; | 713 | }; |
696 | 714 | ||
715 | struct phy_parameters { | ||
716 | u16 length; | ||
717 | u32 *pdata; | ||
718 | }; | ||
719 | |||
720 | enum hw_param_tab_index { | ||
721 | PHY_REG_2T, | ||
722 | PHY_REG_1T, | ||
723 | PHY_REG_PG, | ||
724 | RADIOA_2T, | ||
725 | RADIOB_2T, | ||
726 | RADIOA_1T, | ||
727 | RADIOB_1T, | ||
728 | MAC_REG, | ||
729 | AGCTAB_2T, | ||
730 | AGCTAB_1T, | ||
731 | MAX_TAB | ||
732 | }; | ||
733 | |||
697 | struct rtl_phy { | 734 | struct rtl_phy { |
698 | struct bb_reg_def phyreg_def[4]; /*Radio A/B/C/D */ | 735 | struct bb_reg_def phyreg_def[4]; /*Radio A/B/C/D */ |
699 | struct init_gain initgain_backup; | 736 | struct init_gain initgain_backup; |
@@ -747,6 +784,7 @@ struct rtl_phy { | |||
747 | u32 framesync_c34; | 784 | u32 framesync_c34; |
748 | 785 | ||
749 | u8 num_total_rfpath; | 786 | u8 num_total_rfpath; |
787 | struct phy_parameters hwparam_tables[MAX_TAB]; | ||
750 | }; | 788 | }; |
751 | 789 | ||
752 | #define MAX_TID_COUNT 9 | 790 | #define MAX_TID_COUNT 9 |
@@ -862,11 +900,13 @@ struct rtl_hal { | |||
862 | enum intf_type interface; | 900 | enum intf_type interface; |
863 | u16 hw_type; /*92c or 92d or 92s and so on */ | 901 | u16 hw_type; /*92c or 92d or 92s and so on */ |
864 | u8 oem_id; | 902 | u8 oem_id; |
865 | u8 version; /*version of chip */ | 903 | u32 version; /*version of chip */ |
866 | u8 state; /*stop 0, start 1 */ | 904 | u8 state; /*stop 0, start 1 */ |
867 | 905 | ||
868 | /*firmware */ | 906 | /*firmware */ |
869 | u8 *pfirmware; | 907 | u8 *pfirmware; |
908 | u16 fw_version; | ||
909 | u16 fw_subversion; | ||
870 | bool h2c_setinprogress; | 910 | bool h2c_setinprogress; |
871 | u8 last_hmeboxnum; | 911 | u8 last_hmeboxnum; |
872 | bool fw_ready; | 912 | bool fw_ready; |
@@ -925,10 +965,10 @@ struct rtl_dm { | |||
925 | char cck_index; | 965 | char cck_index; |
926 | }; | 966 | }; |
927 | 967 | ||
928 | #define EFUSE_MAX_LOGICAL_SIZE 128 | 968 | #define EFUSE_MAX_LOGICAL_SIZE 256 |
929 | 969 | ||
930 | struct rtl_efuse { | 970 | struct rtl_efuse { |
931 | bool autoLoad_ok; | 971 | bool autoload_ok; |
932 | bool bootfromefuse; | 972 | bool bootfromefuse; |
933 | u16 max_physical_size; | 973 | u16 max_physical_size; |
934 | u8 contents[EFUSE_MAX_LOGICAL_SIZE]; | 974 | u8 contents[EFUSE_MAX_LOGICAL_SIZE]; |
@@ -947,6 +987,8 @@ struct rtl_efuse { | |||
947 | u8 eeprom_oemid; | 987 | u8 eeprom_oemid; |
948 | u16 eeprom_channelplan; | 988 | u16 eeprom_channelplan; |
949 | u8 eeprom_version; | 989 | u8 eeprom_version; |
990 | u8 board_type; | ||
991 | u8 external_pa; | ||
950 | 992 | ||
951 | u8 dev_addr[6]; | 993 | u8 dev_addr[6]; |
952 | 994 | ||
@@ -1020,6 +1062,7 @@ struct rtl_ps_ctl { | |||
1020 | /*just for PCIE ASPM */ | 1062 | /*just for PCIE ASPM */ |
1021 | u8 const_amdpci_aspm; | 1063 | u8 const_amdpci_aspm; |
1022 | 1064 | ||
1065 | bool pwrdown_mode; | ||
1023 | enum rf_pwrstate inactive_pwrstate; | 1066 | enum rf_pwrstate inactive_pwrstate; |
1024 | enum rf_pwrstate rfpwr_state; /*cur power state */ | 1067 | enum rf_pwrstate rfpwr_state; /*cur power state */ |
1025 | }; | 1068 | }; |
@@ -1120,9 +1163,11 @@ struct rtl_hal_ops { | |||
1120 | void (*disable_interrupt) (struct ieee80211_hw *hw); | 1163 | void (*disable_interrupt) (struct ieee80211_hw *hw); |
1121 | int (*set_network_type) (struct ieee80211_hw *hw, | 1164 | int (*set_network_type) (struct ieee80211_hw *hw, |
1122 | enum nl80211_iftype type); | 1165 | enum nl80211_iftype type); |
1166 | void (*set_chk_bssid)(struct ieee80211_hw *hw, | ||
1167 | bool check_bssid); | ||
1123 | void (*set_bw_mode) (struct ieee80211_hw *hw, | 1168 | void (*set_bw_mode) (struct ieee80211_hw *hw, |
1124 | enum nl80211_channel_type ch_type); | 1169 | enum nl80211_channel_type ch_type); |
1125 | u8(*switch_channel) (struct ieee80211_hw *hw); | 1170 | u8 (*switch_channel) (struct ieee80211_hw *hw); |
1126 | void (*set_qos) (struct ieee80211_hw *hw, int aci); | 1171 | void (*set_qos) (struct ieee80211_hw *hw, int aci); |
1127 | void (*set_bcn_reg) (struct ieee80211_hw *hw); | 1172 | void (*set_bcn_reg) (struct ieee80211_hw *hw); |
1128 | void (*set_bcn_intv) (struct ieee80211_hw *hw); | 1173 | void (*set_bcn_intv) (struct ieee80211_hw *hw); |
@@ -1136,6 +1181,8 @@ struct rtl_hal_ops { | |||
1136 | struct ieee80211_hdr *hdr, u8 *pdesc_tx, | 1181 | struct ieee80211_hdr *hdr, u8 *pdesc_tx, |
1137 | struct ieee80211_tx_info *info, | 1182 | struct ieee80211_tx_info *info, |
1138 | struct sk_buff *skb, unsigned int queue_index); | 1183 | struct sk_buff *skb, unsigned int queue_index); |
1184 | void (*fill_fake_txdesc) (struct ieee80211_hw *hw, u8 * pDesc, | ||
1185 | u32 buffer_len, bool bIsPsPoll); | ||
1139 | void (*fill_tx_cmddesc) (struct ieee80211_hw *hw, u8 *pdesc, | 1186 | void (*fill_tx_cmddesc) (struct ieee80211_hw *hw, u8 *pdesc, |
1140 | bool firstseg, bool lastseg, | 1187 | bool firstseg, bool lastseg, |
1141 | struct sk_buff *skb); | 1188 | struct sk_buff *skb); |
@@ -1311,6 +1358,89 @@ struct rtl_priv { | |||
1311 | #define rtl_efuse(rtlpriv) (&((rtlpriv)->efuse)) | 1358 | #define rtl_efuse(rtlpriv) (&((rtlpriv)->efuse)) |
1312 | #define rtl_psc(rtlpriv) (&((rtlpriv)->psc)) | 1359 | #define rtl_psc(rtlpriv) (&((rtlpriv)->psc)) |
1313 | 1360 | ||
1361 | /*************************************** | ||
1362 | Bluetooth Co-existance Related | ||
1363 | ****************************************/ | ||
1364 | |||
1365 | enum bt_ant_num { | ||
1366 | ANT_X2 = 0, | ||
1367 | ANT_X1 = 1, | ||
1368 | }; | ||
1369 | |||
1370 | enum bt_co_type { | ||
1371 | BT_2WIRE = 0, | ||
1372 | BT_ISSC_3WIRE = 1, | ||
1373 | BT_ACCEL = 2, | ||
1374 | BT_CSR_BC4 = 3, | ||
1375 | BT_CSR_BC8 = 4, | ||
1376 | BT_RTL8756 = 5, | ||
1377 | }; | ||
1378 | |||
1379 | enum bt_cur_state { | ||
1380 | BT_OFF = 0, | ||
1381 | BT_ON = 1, | ||
1382 | }; | ||
1383 | |||
1384 | enum bt_service_type { | ||
1385 | BT_SCO = 0, | ||
1386 | BT_A2DP = 1, | ||
1387 | BT_HID = 2, | ||
1388 | BT_HID_IDLE = 3, | ||
1389 | BT_SCAN = 4, | ||
1390 | BT_IDLE = 5, | ||
1391 | BT_OTHER_ACTION = 6, | ||
1392 | BT_BUSY = 7, | ||
1393 | BT_OTHERBUSY = 8, | ||
1394 | BT_PAN = 9, | ||
1395 | }; | ||
1396 | |||
1397 | enum bt_radio_shared { | ||
1398 | BT_RADIO_SHARED = 0, | ||
1399 | BT_RADIO_INDIVIDUAL = 1, | ||
1400 | }; | ||
1401 | |||
1402 | struct bt_coexist_info { | ||
1403 | |||
1404 | /* EEPROM BT info. */ | ||
1405 | u8 eeprom_bt_coexist; | ||
1406 | u8 eeprom_bt_type; | ||
1407 | u8 eeprom_bt_ant_num; | ||
1408 | u8 eeprom_bt_ant_isolation; | ||
1409 | u8 eeprom_bt_radio_shared; | ||
1410 | |||
1411 | u8 bt_coexistence; | ||
1412 | u8 bt_ant_num; | ||
1413 | u8 bt_coexist_type; | ||
1414 | u8 bt_state; | ||
1415 | u8 bt_cur_state; /* 0:on, 1:off */ | ||
1416 | u8 bt_ant_isolation; /* 0:good, 1:bad */ | ||
1417 | u8 bt_pape_ctrl; /* 0:SW, 1:SW/HW dynamic */ | ||
1418 | u8 bt_service; | ||
1419 | u8 bt_radio_shared_type; | ||
1420 | u8 bt_rfreg_origin_1e; | ||
1421 | u8 bt_rfreg_origin_1f; | ||
1422 | u8 bt_rssi_state; | ||
1423 | u32 ratio_tx; | ||
1424 | u32 ratio_pri; | ||
1425 | u32 bt_edca_ul; | ||
1426 | u32 bt_edca_dl; | ||
1427 | |||
1428 | bool b_init_set; | ||
1429 | bool b_bt_busy_traffic; | ||
1430 | bool b_bt_traffic_mode_set; | ||
1431 | bool b_bt_non_traffic_mode_set; | ||
1432 | |||
1433 | bool b_fw_coexist_all_off; | ||
1434 | bool b_sw_coexist_all_off; | ||
1435 | u32 current_state; | ||
1436 | u32 previous_state; | ||
1437 | u8 bt_pre_rssi_state; | ||
1438 | |||
1439 | u8 b_reg_bt_iso; | ||
1440 | u8 b_reg_bt_sco; | ||
1441 | |||
1442 | }; | ||
1443 | |||
1314 | /**************************************** | 1444 | /**************************************** |
1315 | mem access macro define start | 1445 | mem access macro define start |
1316 | Call endian free function when | 1446 | Call endian free function when |