wmi.c (eba95bceb4c9f537c6c8a5aeba4277e76599e269) wmi.c (c1d32d3038ff4d366b837cedb95aeb1801730f2c)
1/*
2 * Copyright (c) 2004-2011 Atheros Communications Inc.
3 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *

--- 45 unchanged lines hidden (view full) ---

54 {54000, 60000},
55 {81000, 90000},
56 {108000, 120000},
57 {121500, 135000},
58 {135000, 150000},
59 {0, 0}
60};
61
1/*
2 * Copyright (c) 2004-2011 Atheros Communications Inc.
3 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *

--- 45 unchanged lines hidden (view full) ---

54 {54000, 60000},
55 {81000, 90000},
56 {108000, 120000},
57 {121500, 135000},
58 {135000, 150000},
59 {0, 0}
60};
61
62static const s32 wmi_rate_tbl_mcs15[][2] = {
63 /* {W/O SGI, with SGI} */
64 {1000, 1000},
65 {2000, 2000},
66 {5500, 5500},
67 {11000, 11000},
68 {6000, 6000},
69 {9000, 9000},
70 {12000, 12000},
71 {18000, 18000},
72 {24000, 24000},
73 {36000, 36000},
74 {48000, 48000},
75 {54000, 54000},
76 {6500, 7200}, /* HT 20, MCS 0 */
77 {13000, 14400},
78 {19500, 21700},
79 {26000, 28900},
80 {39000, 43300},
81 {52000, 57800},
82 {58500, 65000},
83 {65000, 72200},
84 {13000, 14400}, /* HT 20, MCS 8 */
85 {26000, 28900},
86 {39000, 43300},
87 {52000, 57800},
88 {78000, 86700},
89 {104000, 115600},
90 {117000, 130000},
91 {130000, 144400}, /* HT 20, MCS 15 */
92 {13500, 15000}, /*HT 40, MCS 0 */
93 {27000, 30000},
94 {40500, 45000},
95 {54000, 60000},
96 {81000, 90000},
97 {108000, 120000},
98 {121500, 135000},
99 {135000, 150000},
100 {27000, 30000}, /*HT 40, MCS 8 */
101 {54000, 60000},
102 {81000, 90000},
103 {108000, 120000},
104 {162000, 180000},
105 {216000, 240000},
106 {243000, 270000},
107 {270000, 300000}, /*HT 40, MCS 15 */
108 {0, 0}
109};
110
62/* 802.1d to AC mapping. Refer pg 57 of WMM-test-plan-v1.2 */
63static const u8 up_to_ac[] = {
64 WMM_AC_BE,
65 WMM_AC_BK,
66 WMM_AC_BK,
67 WMM_AC_BE,
68 WMM_AC_VI,
69 WMM_AC_VI,

--- 3205 unchanged lines hidden (view full) ---

3275 cmd = (struct wmi_set_regdomain_cmd *) skb->data;
3276 memcpy(cmd->iso_name, alpha2, 2);
3277
3278 return ath6kl_wmi_cmd_send(wmi, 0, skb,
3279 WMI_SET_REGDOMAIN_CMDID,
3280 NO_SYNC_WMIFLAG);
3281}
3282
111/* 802.1d to AC mapping. Refer pg 57 of WMM-test-plan-v1.2 */
112static const u8 up_to_ac[] = {
113 WMM_AC_BE,
114 WMM_AC_BK,
115 WMM_AC_BK,
116 WMM_AC_BE,
117 WMM_AC_VI,
118 WMM_AC_VI,

--- 3205 unchanged lines hidden (view full) ---

3324 cmd = (struct wmi_set_regdomain_cmd *) skb->data;
3325 memcpy(cmd->iso_name, alpha2, 2);
3326
3327 return ath6kl_wmi_cmd_send(wmi, 0, skb,
3328 WMI_SET_REGDOMAIN_CMDID,
3329 NO_SYNC_WMIFLAG);
3330}
3331
3283s32 ath6kl_wmi_get_rate(s8 rate_index)
3332s32 ath6kl_wmi_get_rate(struct wmi *wmi, s8 rate_index)
3284{
3333{
3334 struct ath6kl *ar = wmi->parent_dev;
3285 u8 sgi = 0;
3335 u8 sgi = 0;
3336 s32 ret;
3286
3287 if (rate_index == RATE_AUTO)
3288 return 0;
3289
3290 /* SGI is stored as the MSB of the rate_index */
3291 if (rate_index & RATE_INDEX_MSB) {
3292 rate_index &= RATE_INDEX_WITHOUT_SGI_MASK;
3293 sgi = 1;
3294 }
3295
3337
3338 if (rate_index == RATE_AUTO)
3339 return 0;
3340
3341 /* SGI is stored as the MSB of the rate_index */
3342 if (rate_index & RATE_INDEX_MSB) {
3343 rate_index &= RATE_INDEX_WITHOUT_SGI_MASK;
3344 sgi = 1;
3345 }
3346
3296 if (WARN_ON(rate_index > RATE_MCS_7_40))
3297 rate_index = RATE_MCS_7_40;
3347 if (test_bit(ATH6KL_FW_CAPABILITY_RATETABLE_MCS15,
3348 ar->fw_capabilities)) {
3349 if (WARN_ON(rate_index >= ARRAY_SIZE(wmi_rate_tbl_mcs15)))
3350 return 0;
3298
3351
3299 return wmi_rate_tbl[(u32) rate_index][sgi];
3352 ret = wmi_rate_tbl_mcs15[(u32) rate_index][sgi];
3353 } else {
3354 if (WARN_ON(rate_index >= ARRAY_SIZE(wmi_rate_tbl)))
3355 return 0;
3356
3357 ret = wmi_rate_tbl[(u32) rate_index][sgi];
3358 }
3359
3360 return ret;
3300}
3301
3302static int ath6kl_wmi_get_pmkid_list_event_rx(struct wmi *wmi, u8 *datap,
3303 u32 len)
3304{
3305 struct wmi_pmkid_list_reply *reply;
3306 u32 expected_len;
3307

--- 824 unchanged lines hidden ---
3361}
3362
3363static int ath6kl_wmi_get_pmkid_list_event_rx(struct wmi *wmi, u8 *datap,
3364 u32 len)
3365{
3366 struct wmi_pmkid_list_reply *reply;
3367 u32 expected_len;
3368

--- 824 unchanged lines hidden ---