Index: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_Allpowerful_New/output/eeprom.dat	(revision 821)
+++ /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_Allpowerful_New/output/eeprom.dat	(working copy)
@@ -2,40 +2,44 @@
 02
 aa
 55
-3e
+7e
 02
 c2
 84
 00
-09
+0a
 c0
 00
 00
-14
+15
 c0
 41
 80
-26
+27
+c0
+42
+80
+30
 c0
 45
 80
-19
+1a
 c0
 46
 00
-7a
+8a
 c0
 57
 00
-2f
+3f
 c0
 5d
 80
-37
+47
 c0
 5e
 00
-3d
+4d
 20
 20
 13
@@ -43,19 +47,19 @@
 c0
 48
 00
-5e
+6e
 c0
 4a
 80
-6f
+7f
 c0
 54
 80
-0e
+0f
 c0
 73
 00
-39
+49
 20
 20
 13
@@ -155,7 +159,7 @@
 20
 20
 12
-1e
+1d
 70
 89
 00
@@ -179,7 +183,7 @@
 c0
 04
 00
-2d
+2e
 20
 20
 11
@@ -192,6 +196,66 @@
 20
 11
 7d
+20
+40
+4c
+a7
+6f
+e0
+c1
+ea
+c0
+7f
+80
+38
+d8
+c0
+41
+eb
+98
+c0
+8c
+00
+ef
+e0
+80
+06
+67
+f0
+89
+61
+70
+89
+60
+27
+68
+48
+c1
+ee
+6f
+f0
+89
+60
+98
+41
+fe
+00
+1f
+e1
+fe
+01
+67
+f0
+89
+60
+70
+89
+61
+66
+20
+20
+11
+b3
 d8
 40
 aa
@@ -227,7 +291,7 @@
 20
 40
 00
-35
+45
 20
 20
 36
@@ -263,7 +327,7 @@
 20
 40
 00
-42
+52
 20
 20
 36
@@ -275,11 +339,11 @@
 20
 40
 00
-45
+55
 20
 20
 00
-51
+61
 6f
 e0
 c9
@@ -395,7 +459,7 @@
 c0
 00
 00
-63
+73
 20
 20
 7a
@@ -423,7 +487,7 @@
 c0
 00
 80
-6a
+7a
 20
 20
 7a
@@ -435,7 +499,7 @@
 c0
 04
 80
-6d
+7d
 20
 20
 7a
@@ -539,7 +603,7 @@
 20
 40
 00
-75
+85
 1f
 e6
 7e
@@ -563,7 +627,7 @@
 24
 20
 80
-8d
+9d
 58
 00
 00
@@ -576,8 +640,8 @@
 20
 12
 91
-84
-30
+61
+8a
 aa
 55
 40
@@ -600,7 +664,7 @@
 00
 00
 00
-08
+28
 18
 00
 00
@@ -743,5 +807,5 @@
 ee
 41
 00
-c8
-1b
+dd
+3d
Index: output/program.lis
===================================================================
--- /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_Allpowerful_New/output/program.lis	(revision 821)
+++ /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_Allpowerful_New/output/program.lis	(working copy)
@@ -1,192 +1,212 @@
               include "bt_format "
               org 0x0000
-0000 c2840009 bbit1 8 ,pf_patch_ext 
-0001 c0000014 beq patch00_0 ,p_soft_reset 
-0002 c0418026 beq patch10_3 ,p_set_sync_on 
-0003 c0458019 beq patch11_3 ,p_initialize_radio_cont 
-0004 c046007a beq patch11_4 ,p_save_rssi 
-0005 c057002f beq patch15_6 ,p_app_init 
-0006 c05d8037 beq patch17_3 ,p_dongle_usb_dispatch 
-0007 c05e003d beq patch17_4 ,p_dongle_work_mode_auto 
-0008 2020137c branch loop 
+0000 c284000a bbit1 8 ,pf_patch_ext 
+0001 c0000015 beq patch00_0 ,p_soft_reset 
+0002 c0418027 beq patch10_3 ,p_set_sync_on 
+0003 c0428030 beq patch10_5 ,p_rf_rx_enable 
+0004 c045801a beq patch11_3 ,p_initialize_radio_cont 
+0005 c046008a beq patch11_4 ,p_save_rssi 
+0006 c057003f beq patch15_6 ,p_app_init 
+0007 c05d8047 beq patch17_3 ,p_dongle_usb_dispatch 
+0008 c05e004d beq patch17_4 ,p_dongle_work_mode_auto 
+0009 2020137c branch loop 
 
 pf_patch_ext:
-0009 c048005e beq patch32_0 ,p_usb_class_type 
-000a c04a806f beq patch32_5 ,p_usb_tx 
-000b c054800e beq patch35_1 ,p_le_enable 
-000c c0730039 beq patch3c_6 ,p_g24_bind_mode_auto 
-000d 2020137c branch loop 
+000a c048006e beq patch32_0 ,p_usb_class_type 
+000b c04a807f beq patch32_5 ,p_usb_tx 
+000c c054800f beq patch35_1 ,p_le_enable 
+000d c0730049 beq patch3c_6 ,p_g24_bind_mode_auto 
+000e 2020137c branch loop 
 
 p_le_enable:
-000e 204016a6 call le_enable + 1 
-000f 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
-0010 6ff08a43 fetch 1 ,core_syn_cal_ctrl 
-0011 1fe1fe0f or pdata ,0x0f ,pdata 
-0012 67f08a43 store 1 ,core_syn_cal_ctrl 
-0013 20600000 rtn 
+000f 204016a6 call le_enable + 1 
+0010 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
+0011 6ff08a43 fetch 1 ,core_syn_cal_ctrl 
+0012 1fe1fe0f or pdata ,0x0f ,pdata 
+0013 67f08a43 store 1 ,core_syn_cal_ctrl 
+0014 20600000 rtn 
 
 p_soft_reset:
-0014 20800000 clear_stack 
-0015 204030f3 call app_param_init 
-0016 7041e89e jam 0x9e ,mem_tx_power 
-0017 7048cc9e jam 0x9e ,mem_tx_power_temp 
-0018 20200804 branch soft_reset + 3 
+0015 20800000 clear_stack 
+0016 204030f3 call app_param_init 
+0017 7041e89e jam 0x9e ,mem_tx_power 
+0018 7048cc9e jam 0x9e ,mem_tx_power_temp 
+0019 20200804 branch soft_reset + 3 
 
 p_initialize_radio_cont:
-0019 204012d1 call init_lpm_ctrl 
-001a 20000064 nop 100 
-001b 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
-001c 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
-001d 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
-001e 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
-001f 70892140 jam 0x40 ,0x8921 
-0020 70896876 jam 0x76 ,core_agc_wb_sat_th 
-0021 70896976 jam 0x76 ,core_agc_nb_sat_th 
-0022 20401256 call initialize_radio_cont + 1 
-0023 70896fff jam 0xff ,0x896f 
-0024 7089703f jam 0x3f ,0x8970 
-0025 2020121e branch txon_next + 1 
+001a 204012d1 call init_lpm_ctrl 
+001b 20000064 nop 100 
+001c 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
+001d 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
+001e 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
+001f 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
+0020 70892140 jam 0x40 ,0x8921 
+0021 70896876 jam 0x76 ,core_agc_wb_sat_th 
+0022 70896976 jam 0x76 ,core_agc_nb_sat_th 
+0023 20401256 call initialize_radio_cont + 1 
+0024 70896fff jam 0xff ,0x896f 
+0025 7089703f jam 0x3f ,0x8970 
+0026 2020121d branch txon_next 
 
 p_set_sync_on:
-0026 70890005 jam 0x5 ,modem_en 
-0027 20000002 nop 2 
-0028 70890000 jam 0x0 ,modem_en 
-0029 6fe0c0c5 fetch 1 ,mem_fcomp_div 
-002a c00c1168 beq xtal_24m ,set_sync_on_24m 
-002b c004002d beq xtal_16m ,p_set_sync_on_16m 
-002c 20201168 branch set_sync_on_24m 
+0027 70890005 jam 0x5 ,modem_en 
+0028 20000002 nop 2 
+0029 70890000 jam 0x0 ,modem_en 
+002a 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+002b c00c1168 beq xtal_24m ,set_sync_on_24m 
+002c c004002e beq xtal_16m ,p_set_sync_on_16m 
+002d 20201168 branch set_sync_on_24m 
 
 p_set_sync_on_16m:
-002d 708a8729 jam 0x29 ,core_syn_afc_cfg1 
-002e 2020117d branch set_sync_on_16m 
+002e 708a8729 jam 0x29 ,core_syn_afc_cfg1 
+002f 2020117d branch set_sync_on_16m 
+
+p_rf_rx_enable:
+0030 20404ca7 call rf_debug_rx_gpio_high 
+0031 6fe0c1ea fetch 1 ,mem_gain_fix 
+0032 c07f8038 beq 0xff ,p_rf_rx_enable_no_soft_agc 
+0033 d8c041eb arg mem_gain_table ,contr 
+0034 98c08c00 iadd contr ,contr 
+0035 efe08006 ifetch 1 ,contr 
+0036 67f08961 store 1 ,core_rf_rx_gain_fix 
+0037 70896027 jam 0x27 ,core_rf_rx_agc_ctrl 
+
+p_rf_rx_enable_no_soft_agc:
+0038 6848c1ee fetcht 1 ,mem_gain_second_agc_en 
+0039 6ff08960 fetch 1 ,core_rf_rx_agc_ctrl 
+003a 9841fe00 ior temp ,pdata 
+003b 1fe1fe01 or pdata ,0x01 ,pdata 
+003c 67f08960 store 1 ,core_rf_rx_agc_ctrl 
+003d 70896166 jam 0x66 ,core_rf_rx_gain_fix 
+003e 202011b3 branch rf_rx_enable_no_soft_agc_next 
 
 p_app_init:
-002f d840aa00 arg 0xaa00 ,temp 
-0030 20402320 call g24_rx_window_store 
-0031 70486402 jam 0x02 ,mem_24g_rx_phy 
-0032 70486502 jam 0x02 ,mem_24g_tx_phy 
-0033 20403620 call dongle_init 
-0034 2040623c call wdt_set_enable 
+003f d840aa00 arg 0xaa00 ,temp 
+0040 20402320 call g24_rx_window_store 
+0041 70486402 jam 0x02 ,mem_24g_rx_phy 
+0042 70486502 jam 0x02 ,mem_24g_tx_phy 
+0043 20403620 call dongle_init 
+0044 2040623c call wdt_set_enable 
 
 p_wdt_kick:
-0035 5800007d setarg 125 
-0036 2020622d branch wdt_init_config 
+0045 5800007d setarg 125 
+0046 2020622d branch wdt_init_config 
 
 p_dongle_usb_dispatch:
-0037 20400035 call p_wdt_kick 
-0038 202036b5 branch dongle_usb_dispatch + 1 
+0047 20400045 call p_wdt_kick 
+0048 202036b5 branch dongle_usb_dispatch + 1 
 
 p_g24_bind_mode_auto:
-0039 6fe0c8bf fetch 1 ,mem_24g_work_mode 
-003a c1808000 rtnne dongle_bind 
-003b 7041e885 jam tx_power_f5db ,mem_tx_power 
-003c 20202499 branch g24_bind_mode_auto + 3 
+0049 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+004a c1808000 rtnne dongle_bind 
+004b 7041e885 jam tx_power_f5db ,mem_tx_power 
+004c 20202499 branch g24_bind_mode_auto + 3 
 
 p_dongle_work_mode_auto:
-003d 6fe0c8bf fetch 1 ,mem_24g_work_mode 
-003e c1800000 rtnne dongle_work 
-003f 20402491 call g24_work_mode_start 
-0040 20400042 call p_dongle_g24_blank_data_process 
-0041 202036f2 branch dongle_work_mode_auto + 5 
+004d 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+004e c1800000 rtnne dongle_work 
+004f 20402491 call g24_work_mode_start 
+0050 20400052 call p_dongle_g24_blank_data_process 
+0051 202036f2 branch dongle_work_mode_auto + 5 
 
 p_dongle_g24_blank_data_process:
-0042 2040368a call dongle_g24_ms_blank_data 
-0043 20400045 call p_dongle_g24_kb_blank_data 
-0044 20200051 branch p_dongle_g24_kb_mul_blank_data 
+0052 2040368a call dongle_g24_ms_blank_data 
+0053 20400055 call p_dongle_g24_kb_blank_data 
+0054 20200061 branch p_dongle_g24_kb_mul_blank_data 
 
 p_dongle_g24_kb_blank_data:
-0045 6fe0c906 fetch 1 ,mem_dg_kb_blank_data_enable 
-0046 207a0000 rtn blank 
-0047 d8e0000e arg timer_kb_blank ,queue 
-0048 20407d74 call timer_check 
-0049 247a0000 nrtn blank 
-004a 70490600 jam 0 ,mem_dg_kb_blank_data_enable 
-004b d8a00c0f arg mem_usb_kb_data ,contw 
-004c df200002 arg 2 ,loopcnt 
-004d 20407d17 call memset0 
-004e 6fe40c0f fetch 8 ,mem_usb_kb_data 
-004f 67e448f2 store 8 ,mem_dg_kb_data_last_data 
-0050 202036a2 branch dongle_usb_tx_kb_data 
+0055 6fe0c906 fetch 1 ,mem_dg_kb_blank_data_enable 
+0056 207a0000 rtn blank 
+0057 d8e0000e arg timer_kb_blank ,queue 
+0058 20407d74 call timer_check 
+0059 247a0000 nrtn blank 
+005a 70490600 jam 0 ,mem_dg_kb_blank_data_enable 
+005b d8a00c0f arg mem_usb_kb_data ,contw 
+005c df200002 arg 2 ,loopcnt 
+005d 20407d17 call memset0 
+005e 6fe40c0f fetch 8 ,mem_usb_kb_data 
+005f 67e448f2 store 8 ,mem_dg_kb_data_last_data 
+0060 202036a2 branch dongle_usb_tx_kb_data 
 
 p_dongle_g24_kb_mul_blank_data:
-0051 6fe0c907 fetch 1 ,mem_dg_kb_mul_blank_data_enable 
-0052 207a0000 rtn blank 
-0053 d8e0000c arg timer_kb_mul_blank ,queue 
-0054 20407d74 call timer_check 
-0055 247a0000 nrtn blank 
-0056 70490700 jam 0 ,mem_dg_kb_mul_blank_data_enable 
-0057 d8a00c1f arg mem_usb_kb_multikey ,contw 
-0058 df200002 arg 2 ,loopcnt 
-0059 20407d17 call memset0 
-005a 700c1f03 jam kb_multikey_report_id ,mem_usb_kb_multikey 
-005b 6fe18c1f fetch 3 ,mem_usb_kb_multikey 
-005c 67e1c8fd store 3 ,mem_dg_kb_multikey_last_data 
-005d 202036b2 branch dongle_usb_tx_multikey_data 
+0061 6fe0c907 fetch 1 ,mem_dg_kb_mul_blank_data_enable 
+0062 207a0000 rtn blank 
+0063 d8e0000c arg timer_kb_mul_blank ,queue 
+0064 20407d74 call timer_check 
+0065 247a0000 nrtn blank 
+0066 70490700 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+0067 d8a00c1f arg mem_usb_kb_multikey ,contw 
+0068 df200002 arg 2 ,loopcnt 
+0069 20407d17 call memset0 
+006a 700c1f03 jam kb_multikey_report_id ,mem_usb_kb_multikey 
+006b 6fe18c1f fetch 3 ,mem_usb_kb_multikey 
+006c 67e1c8fd store 3 ,mem_dg_kb_multikey_last_data 
+006d 202036b2 branch dongle_usb_tx_multikey_data 
 
 p_usb_class_type:
-005e 793f8023 set0 mark_isstr ,mark 
-005f 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
-0060 1fe17e80 and_into 0x80 ,pdata 
-0061 c0000063 beq out_device ,p_usb_out_device 
-0062 20207a34 branch usb_class_type + 4 
+006e 793f8023 set0 mark_isstr ,mark 
+006f 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+0070 1fe17e80 and_into 0x80 ,pdata 
+0071 c0000073 beq out_device ,p_usb_out_device 
+0072 20207a34 branch usb_class_type + 4 
 
 p_usb_out_device:
-0063 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
-0064 1ff1fe00 rshift4 pdata ,pdata 
-0065 1fe37e00 rshift pdata ,pdata 
-0066 1fe17e03 and_into 0x03 ,pdata 
-0067 c0007a53 beq standard_req ,usb_out_standard_req 
-0068 c000806a beq class_req ,p_usb_out_class_req 
-0069 20207a43 branch usb_out_device + 4 
+0073 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+0074 1ff1fe00 rshift4 pdata ,pdata 
+0075 1fe37e00 rshift pdata ,pdata 
+0076 1fe17e03 and_into 0x03 ,pdata 
+0077 c0007a53 beq standard_req ,usb_out_standard_req 
+0078 c000807a beq class_req ,p_usb_out_class_req 
+0079 20207a43 branch usb_out_device + 4 
 
 p_usb_out_class_req:
-006a 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
-006b c004806d beq set_report ,p_usb_set_report 
-006c 20207a5c branch usb_out_class_req + 1 
+007a 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+007b c004807d beq set_report ,p_usb_set_report 
+007c 20207a5c branch usb_out_class_req + 1 
 
 p_usb_set_report:
-006d 20003a98 nop 15000 
-006e 20207bd8 branch usb_set_report 
+007d 20003a98 nop 15000 
+007e 20207bd8 branch usb_set_report 
 
 p_usb_tx:
-006f 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
-0070 207a0000 rtn blank 
-0071 6ff08c24 fetch 1 ,core_usb_txbusy 
-0072 1fe17e0f and_into 0x0f ,pdata 
-0073 243a7ca4 nbranch usb_inwake_state_tx_dispose ,blank 
-0074 20207c59 branch usb_tx + 3 
+007f 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+0080 207a0000 rtn blank 
+0081 6ff08c24 fetch 1 ,core_usb_txbusy 
+0082 1fe17e0f and_into 0x0f ,pdata 
+0083 243a7ca4 nbranch usb_inwake_state_tx_dispose ,blank 
+0084 20207c59 branch usb_tx + 3 
 
 p_byte_sign_extern:
-0075 2feffe07 isolate1 7 ,pdata 
-0076 24608000 nrtn true 
-0077 d840ff00 arg 0xff00 ,temp 
-0078 9841fe00 ior temp ,pdata 
-0079 20600000 rtn 
+0085 2feffe07 isolate1 7 ,pdata 
+0086 24608000 nrtn true 
+0087 d840ff00 arg 0xff00 ,temp 
+0088 9841fe00 ior temp ,pdata 
+0089 20600000 rtn 
 
 p_save_rssi:
-007a 6ff089a2 fetch 1 ,modem_nb_pow 
-007b 2feffe06 isolate1 6 ,pdata 
-007c 7920fe07 setflag true ,7 ,pdata 
-007d 67e0c1e9 store 1 ,mem_modem_rssi 
-007e 6ff089a3 fetch 1 ,modem_gain 
-007f 1fe1040f and pdata ,0x0f ,temp 
-0080 18438400 lshift temp ,temp 
-0081 1ff1fe00 rshift4 pdata ,pdata 
-0082 98408400 iadd temp ,temp 
-0083 184fa203 mul32 temp ,3 ,rega 
-0084 6fe0c1e9 fetch 1 ,mem_modem_rssi 
-0085 20400075 call p_byte_sign_extern 
-0086 1fe67e00 sub pdata ,0 ,pdata 
-0087 9a20fe00 iadd rega ,pdata 
-0088 1fe0fff7 increase -9 ,pdata 
-0089 1fe17fff and pdata ,0x1ff ,pdata 
-008a 2feffe08 isolate1 8 ,pdata 
-008b 2420808d nbranch p_save_rssi_store ,true 
-008c 58000000 setarg 0 
+008a 6ff089a2 fetch 1 ,modem_nb_pow 
+008b 2feffe06 isolate1 6 ,pdata 
+008c 7920fe07 setflag true ,7 ,pdata 
+008d 67e0c1e9 store 1 ,mem_modem_rssi 
+008e 6ff089a3 fetch 1 ,modem_gain 
+008f 1fe1040f and pdata ,0x0f ,temp 
+0090 18438400 lshift temp ,temp 
+0091 1ff1fe00 rshift4 pdata ,pdata 
+0092 98408400 iadd temp ,temp 
+0093 184fa203 mul32 temp ,3 ,rega 
+0094 6fe0c1e9 fetch 1 ,mem_modem_rssi 
+0095 20400085 call p_byte_sign_extern 
+0096 1fe67e00 sub pdata ,0 ,pdata 
+0097 9a20fe00 iadd rega ,pdata 
+0098 1fe0fff7 increase -9 ,pdata 
+0099 1fe17fff and pdata ,0x1ff ,pdata 
+009a 2feffe08 isolate1 8 ,pdata 
+009b 2420809d nbranch p_save_rssi_store ,true 
+009c 58000000 setarg 0 
 
 p_save_rssi_store:
-008d 67e08019 store 1 ,mem_rssi_hex 
-008e 20201291 branch rssi_hex2dec 
+009d 67e08019 store 1 ,mem_rssi_hex 
+009e 20201291 branch rssi_hex2dec 
               org 0x800
 
 start:
@@ -3365,6 +3385,8 @@
 11b0 6ff08960 fetch 1 ,core_rf_rx_agc_ctrl 
 11b1 9841fe00 ior temp ,pdata 
 11b2 67f08960 store 1 ,core_rf_rx_agc_ctrl 
+
+rf_rx_enable_no_soft_agc_next:
 11b3 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
 11b4 708a112a jam 0x2a ,core_rf_ldo_cfg5 
 11b5 708a1213 jam 0x13 ,core_rf_ldo_cfg6 
Index: program/bt.prog
===================================================================
--- /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_Allpowerful_New/program/bt.prog	(revision 821)
+++ /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_Allpowerful_New/program/bt.prog	(working copy)
@@ -3196,7 +3196,7 @@
 	fetch 1,core_rf_rx_agc_ctrl
 	ior temp,pdata
 	store 1,core_rf_rx_agc_ctrl
-
+rf_rx_enable_no_soft_agc_next:
 	jam 0xaa,core_rf_ldo_cfg4 //ldo config set
 	jam 0x2a,core_rf_ldo_cfg5
 	jam 0x13,core_rf_ldo_cfg6
Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_Allpowerful_New/program/patch.prog	(revision 821)
+++ /YC1308AC/branch/mouse_project/YDN_Project/usb_16M_Allpowerful_New/program/patch.prog	(working copy)
@@ -2,6 +2,7 @@
 	bbit1 8,pf_patch_ext
 	beq patch00_0,p_soft_reset
 	beq patch10_3,p_set_sync_on
+	beq patch10_5,p_rf_rx_enable
 	beq patch11_3,p_initialize_radio_cont
 	beq patch11_4,p_save_rssi
 	beq patch15_6,p_app_init
@@ -56,7 +57,7 @@
 	jam 0xff,0x896f
 	jam 0x3f,0x8970
 
-	branch txon_next+1
+	branch txon_next
 	
 
 p_set_sync_on:
@@ -71,6 +72,25 @@
 p_set_sync_on_16m:
 	jam 0x29,core_syn_afc_cfg1
 	branch set_sync_on_16m
+
+p_rf_rx_enable:
+	call rf_debug_rx_gpio_high
+	fetch 1,mem_gain_fix
+	beq 0xff,p_rf_rx_enable_no_soft_agc 
+	arg mem_gain_table,contr
+	iadd contr,contr
+	ifetch 1,contr
+	store 1,core_rf_rx_gain_fix
+	jam 0x27,core_rf_rx_agc_ctrl
+p_rf_rx_enable_no_soft_agc:
+	fetcht 1,mem_gain_second_agc_en	//0x00 or 0x08
+	fetch 1,core_rf_rx_agc_ctrl
+	ior temp,pdata
+	or pdata,0x01,pdata				//disable agc
+	store 1,core_rf_rx_agc_ctrl
+	jam 0x66,core_rf_rx_gain_fix	//set agc level
+	branch rf_rx_enable_no_soft_agc_next
+	
 p_app_init:
 /********************dongle rx window patch************************/
 	arg 0xaa00,temp
