H A D | linux_wlan.c | 635 unsigned char c_val[64]; linux_wlan_init_test_config() local 651 *(int *)c_val = 1; linux_wlan_init_test_config() 653 if (!wilc_wlan_cfg_set(1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0)) linux_wlan_init_test_config() 657 c_val[0] = 0; linux_wlan_init_test_config() 658 if (!wilc_wlan_cfg_set(0, WID_PC_TEST_MODE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 661 c_val[0] = INFRASTRUCTURE; linux_wlan_init_test_config() 662 if (!wilc_wlan_cfg_set(0, WID_BSS_TYPE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 665 /* c_val[0] = RATE_AUTO; */ linux_wlan_init_test_config() 666 c_val[0] = RATE_AUTO; linux_wlan_init_test_config() 667 if (!wilc_wlan_cfg_set(0, WID_CURRENT_TX_RATE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 670 c_val[0] = G_MIXED_11B_2_MODE; linux_wlan_init_test_config() 671 if (!wilc_wlan_cfg_set(0, WID_11G_OPERATING_MODE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 674 c_val[0] = 1; linux_wlan_init_test_config() 675 if (!wilc_wlan_cfg_set(0, WID_CURRENT_CHANNEL, c_val, 1, 0, 0)) linux_wlan_init_test_config() 678 c_val[0] = G_SHORT_PREAMBLE; linux_wlan_init_test_config() 679 if (!wilc_wlan_cfg_set(0, WID_PREAMBLE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 682 c_val[0] = AUTO_PROT; linux_wlan_init_test_config() 683 if (!wilc_wlan_cfg_set(0, WID_11N_PROT_MECH, c_val, 1, 0, 0)) linux_wlan_init_test_config() 686 c_val[0] = ACTIVE_SCAN; linux_wlan_init_test_config() 687 if (!wilc_wlan_cfg_set(0, WID_SCAN_TYPE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 690 c_val[0] = SITE_SURVEY_OFF; linux_wlan_init_test_config() 691 if (!wilc_wlan_cfg_set(0, WID_SITE_SURVEY, c_val, 1, 0, 0)) linux_wlan_init_test_config() 694 *((int *)c_val) = 0xffff; /* Never use RTS-CTS */ linux_wlan_init_test_config() 695 if (!wilc_wlan_cfg_set(0, WID_RTS_THRESHOLD, c_val, 2, 0, 0)) linux_wlan_init_test_config() 698 *((int *)c_val) = 2346; linux_wlan_init_test_config() 699 if (!wilc_wlan_cfg_set(0, WID_FRAG_THRESHOLD, c_val, 2, 0, 0)) linux_wlan_init_test_config() 709 c_val[0] = 0; linux_wlan_init_test_config() 710 if (!wilc_wlan_cfg_set(0, WID_BCAST_SSID, c_val, 1, 0, 0)) linux_wlan_init_test_config() 713 c_val[0] = 1; linux_wlan_init_test_config() 714 if (!wilc_wlan_cfg_set(0, WID_QOS_ENABLE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 717 c_val[0] = NO_POWERSAVE; linux_wlan_init_test_config() 718 if (!wilc_wlan_cfg_set(0, WID_POWER_MANAGEMENT, c_val, 1, 0, 0)) linux_wlan_init_test_config() 721 c_val[0] = NO_ENCRYPT; /* NO_ENCRYPT, 0x79 */ linux_wlan_init_test_config() 722 if (!wilc_wlan_cfg_set(0, WID_11I_MODE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 725 c_val[0] = OPEN_SYSTEM; linux_wlan_init_test_config() 726 if (!wilc_wlan_cfg_set(0, WID_AUTH_TYPE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 737 strcpy(c_val, "123456790abcdef1234567890"); linux_wlan_init_test_config() 738 if (!wilc_wlan_cfg_set(0, WID_WEP_KEY_VALUE, c_val, (strlen(c_val) + 1), 0, 0)) linux_wlan_init_test_config() 747 strcpy(c_val, "12345678"); linux_wlan_init_test_config() 748 if (!wilc_wlan_cfg_set(0, WID_11I_PSK, c_val, (strlen(c_val)), 0, 0)) linux_wlan_init_test_config() 757 strcpy(c_val, "password"); linux_wlan_init_test_config() 758 if (!wilc_wlan_cfg_set(0, WID_1X_KEY, c_val, (strlen(c_val) + 1), 0, 0)) linux_wlan_init_test_config() 766 c_val[0] = 192; linux_wlan_init_test_config() 767 c_val[1] = 168; linux_wlan_init_test_config() 768 c_val[2] = 1; linux_wlan_init_test_config() 769 c_val[3] = 112; linux_wlan_init_test_config() 770 if (!wilc_wlan_cfg_set(0, WID_1X_SERV_ADDR, c_val, 4, 0, 0)) linux_wlan_init_test_config() 773 c_val[0] = 3; linux_wlan_init_test_config() 774 if (!wilc_wlan_cfg_set(0, WID_LISTEN_INTERVAL, c_val, 1, 0, 0)) linux_wlan_init_test_config() 777 c_val[0] = 3; linux_wlan_init_test_config() 778 if (!wilc_wlan_cfg_set(0, WID_DTIM_PERIOD, c_val, 1, 0, 0)) linux_wlan_init_test_config() 781 c_val[0] = NORMAL_ACK; linux_wlan_init_test_config() 782 if (!wilc_wlan_cfg_set(0, WID_ACK_POLICY, c_val, 1, 0, 0)) linux_wlan_init_test_config() 785 c_val[0] = 0; linux_wlan_init_test_config() 786 if (!wilc_wlan_cfg_set(0, WID_USER_CONTROL_ON_TX_POWER, c_val, 1, 0, 0)) linux_wlan_init_test_config() 789 c_val[0] = 48; linux_wlan_init_test_config() 790 if (!wilc_wlan_cfg_set(0, WID_TX_POWER_LEVEL_11A, c_val, 1, 0, 0)) linux_wlan_init_test_config() 793 c_val[0] = 28; linux_wlan_init_test_config() 794 if (!wilc_wlan_cfg_set(0, WID_TX_POWER_LEVEL_11B, c_val, 1, 0, 0)) linux_wlan_init_test_config() 803 *((int *)c_val) = 100; linux_wlan_init_test_config() 804 if (!wilc_wlan_cfg_set(0, WID_BEACON_INTERVAL, c_val, 2, 0, 0)) linux_wlan_init_test_config() 807 c_val[0] = REKEY_DISABLE; linux_wlan_init_test_config() 808 if (!wilc_wlan_cfg_set(0, WID_REKEY_POLICY, c_val, 1, 0, 0)) linux_wlan_init_test_config() 816 *((int *)c_val) = 84600; linux_wlan_init_test_config() 817 if (!wilc_wlan_cfg_set(0, WID_REKEY_PERIOD, c_val, 4, 0, 0)) linux_wlan_init_test_config() 825 *((int *)c_val) = 500; linux_wlan_init_test_config() 826 if (!wilc_wlan_cfg_set(0, WID_REKEY_PACKET_COUNT, c_val, 4, 0, 0)) linux_wlan_init_test_config() 829 c_val[0] = 1; linux_wlan_init_test_config() 830 if (!wilc_wlan_cfg_set(0, WID_SHORT_SLOT_ALLOWED, c_val, 1, 0, 0)) linux_wlan_init_test_config() 833 c_val[0] = G_SELF_CTS_PROT; linux_wlan_init_test_config() 834 if (!wilc_wlan_cfg_set(0, WID_11N_ERP_PROT_TYPE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 837 c_val[0] = 1; /* Enable N */ linux_wlan_init_test_config() 838 if (!wilc_wlan_cfg_set(0, WID_11N_ENABLE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 841 c_val[0] = HT_MIXED_MODE; linux_wlan_init_test_config() 842 if (!wilc_wlan_cfg_set(0, WID_11N_OPERATING_MODE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 845 c_val[0] = 1; /* TXOP Prot disable in N mode: No RTS-CTS on TX A-MPDUs to save air-time. */ linux_wlan_init_test_config() 846 if (!wilc_wlan_cfg_set(0, WID_11N_TXOP_PROT_DISABLE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 849 memcpy(c_val, mac_add, 6); linux_wlan_init_test_config() 851 if (!wilc_wlan_cfg_set(0, WID_MAC_ADDR, c_val, 6, 0, 0)) linux_wlan_init_test_config() 857 c_val[0] = DETECT_PROTECT_REPORT; linux_wlan_init_test_config() 858 if (!wilc_wlan_cfg_set(0, WID_11N_OBSS_NONHT_DETECTION, c_val, 1, 0, 0)) linux_wlan_init_test_config() 861 c_val[0] = RTS_CTS_NONHT_PROT; linux_wlan_init_test_config() 862 if (!wilc_wlan_cfg_set(0, WID_11N_HT_PROT_TYPE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 865 c_val[0] = 0; linux_wlan_init_test_config() 866 if (!wilc_wlan_cfg_set(0, WID_11N_RIFS_PROT_ENABLE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 869 c_val[0] = MIMO_MODE; linux_wlan_init_test_config() 870 if (!wilc_wlan_cfg_set(0, WID_11N_SMPS_MODE, c_val, 1, 0, 0)) linux_wlan_init_test_config() 873 c_val[0] = 7; linux_wlan_init_test_config() 874 if (!wilc_wlan_cfg_set(0, WID_11N_CURRENT_TX_MCS, c_val, 1, 0, 0)) linux_wlan_init_test_config() 877 c_val[0] = 1; /* Enable N with immediate block ack. */ linux_wlan_init_test_config() 878 if (!wilc_wlan_cfg_set(0, WID_11N_IMMEDIATE_BA_ENABLED, c_val, 1, 1, 1)) linux_wlan_init_test_config()
|