aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/bt-coex.c291
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/constants.h1
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/debugfs.c3
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw-api-bt-coex.h2
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw-api.h1
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h5
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/ops.c3
7 files changed, 303 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
index 38a54a3fde34..4ae3c850b57e 100644
--- a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
+++ b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
@@ -305,6 +305,215 @@ static const __le32 iwl_bt_mprio_lut[BT_COEX_MULTI_PRIO_LUT_SIZE] = {
305 cpu_to_le32(0x33113311), 305 cpu_to_le32(0x33113311),
306}; 306};
307 307
308struct corunning_block_luts {
309 u8 range;
310 __le32 lut20[BT_COEX_CORUN_LUT_SIZE];
311};
312
313/*
314 * Ranges for the antenna coupling calibration / co-running block LUT:
315 * LUT0: [ 0, 12[
316 * LUT1: [12, 20[
317 * LUT2: [20, 21[
318 * LUT3: [21, 23[
319 * LUT4: [23, 27[
320 * LUT5: [27, 30[
321 * LUT6: [30, 32[
322 * LUT7: [32, 33[
323 * LUT8: [33, - [
324 */
325static const struct corunning_block_luts antenna_coupling_ranges[] = {
326 {
327 .range = 0,
328 .lut20 = {
329 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
330 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
331 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
332 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
333 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
334 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
335 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
336 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
337 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
338 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
339 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
340 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
341 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
342 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
343 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
344 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
345 },
346 },
347 {
348 .range = 12,
349 .lut20 = {
350 cpu_to_le32(0x00000001), cpu_to_le32(0x00000000),
351 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
352 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
353 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
354 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
355 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
356 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
357 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
358 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
359 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
360 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
361 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
362 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
363 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
364 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
365 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
366 },
367 },
368 {
369 .range = 20,
370 .lut20 = {
371 cpu_to_le32(0x00000002), cpu_to_le32(0x00000000),
372 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
373 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
374 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
375 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
376 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
377 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
378 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
379 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
380 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
381 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
382 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
383 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
384 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
385 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
386 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
387 },
388 },
389 {
390 .range = 21,
391 .lut20 = {
392 cpu_to_le32(0x00000003), cpu_to_le32(0x00000000),
393 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
394 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
395 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
396 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
397 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
398 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
399 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
400 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
401 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
402 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
403 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
404 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
405 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
406 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
407 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
408 },
409 },
410 {
411 .range = 23,
412 .lut20 = {
413 cpu_to_le32(0x00000004), cpu_to_le32(0x00000000),
414 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
415 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
416 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
417 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
418 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
419 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
420 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
421 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
422 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
423 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
424 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
425 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
426 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
427 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
428 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
429 },
430 },
431 {
432 .range = 27,
433 .lut20 = {
434 cpu_to_le32(0x00000005), cpu_to_le32(0x00000000),
435 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
436 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
437 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
438 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
439 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
440 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
441 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
442 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
443 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
444 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
445 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
446 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
447 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
448 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
449 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
450 },
451 },
452 {
453 .range = 30,
454 .lut20 = {
455 cpu_to_le32(0x00000006), cpu_to_le32(0x00000000),
456 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
457 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
458 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
459 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
460 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
461 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
462 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
463 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
464 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
465 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
466 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
467 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
468 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
469 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
470 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
471 },
472 },
473 {
474 .range = 32,
475 .lut20 = {
476 cpu_to_le32(0x00000007), cpu_to_le32(0x00000000),
477 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
478 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
479 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
480 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
481 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
482 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
483 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
484 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
485 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
486 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
487 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
488 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
489 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
490 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
491 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
492 },
493 },
494 {
495 .range = 33,
496 .lut20 = {
497 cpu_to_le32(0x00000008), cpu_to_le32(0x00000000),
498 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
499 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
500 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
501 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
502 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
503 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
504 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
505 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
506 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
507 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
508 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
509 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
510 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
511 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
512 cpu_to_le32(0x00000000), cpu_to_le32(0x00000000),
513 },
514 },
515};
516
308static enum iwl_bt_coex_lut_type 517static enum iwl_bt_coex_lut_type
309iwl_get_coex_type(struct iwl_mvm *mvm, const struct ieee80211_vif *vif) 518iwl_get_coex_type(struct iwl_mvm *mvm, const struct ieee80211_vif *vif)
310{ 519{
@@ -390,8 +599,6 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm)
390 BT_VALID_LUT | 599 BT_VALID_LUT |
391 BT_VALID_WIFI_RX_SW_PRIO_BOOST | 600 BT_VALID_WIFI_RX_SW_PRIO_BOOST |
392 BT_VALID_WIFI_TX_SW_PRIO_BOOST | 601 BT_VALID_WIFI_TX_SW_PRIO_BOOST |
393 BT_VALID_CORUN_LUT_20 |
394 BT_VALID_CORUN_LUT_40 |
395 BT_VALID_ANT_ISOLATION | 602 BT_VALID_ANT_ISOLATION |
396 BT_VALID_ANT_ISOLATION_THRS | 603 BT_VALID_ANT_ISOLATION_THRS |
397 BT_VALID_TXTX_DELTA_FREQ_THRS | 604 BT_VALID_TXTX_DELTA_FREQ_THRS |
@@ -401,6 +608,12 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm)
401 if (IWL_MVM_BT_COEX_SYNC2SCO) 608 if (IWL_MVM_BT_COEX_SYNC2SCO)
402 bt_cmd->flags |= cpu_to_le32(BT_COEX_SYNC2SCO); 609 bt_cmd->flags |= cpu_to_le32(BT_COEX_SYNC2SCO);
403 610
611 if (IWL_MVM_BT_COEX_CORUNNING) {
612 bt_cmd->valid_bit_msk = cpu_to_le32(BT_VALID_CORUN_LUT_20 |
613 BT_VALID_CORUN_LUT_40);
614 bt_cmd->flags |= cpu_to_le32(BT_COEX_CORUNNING);
615 }
616
404 if (mvm->cfg->bt_shared_single_ant) 617 if (mvm->cfg->bt_shared_single_ant)
405 memcpy(&bt_cmd->decision_lut, iwl_single_shared_ant, 618 memcpy(&bt_cmd->decision_lut, iwl_single_shared_ant,
406 sizeof(iwl_single_shared_ant)); 619 sizeof(iwl_single_shared_ant));
@@ -408,6 +621,12 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm)
408 memcpy(&bt_cmd->decision_lut, iwl_combined_lookup, 621 memcpy(&bt_cmd->decision_lut, iwl_combined_lookup,
409 sizeof(iwl_combined_lookup)); 622 sizeof(iwl_combined_lookup));
410 623
624 /* Take first Co-running block LUT to get started */
625 memcpy(bt_cmd->bt4_corun_lut20, antenna_coupling_ranges[0].lut20,
626 sizeof(bt_cmd->bt4_corun_lut20));
627 memcpy(bt_cmd->bt4_corun_lut40, antenna_coupling_ranges[0].lut20,
628 sizeof(bt_cmd->bt4_corun_lut40));
629
411 memcpy(&bt_cmd->bt_prio_boost, iwl_bt_prio_boost, 630 memcpy(&bt_cmd->bt_prio_boost, iwl_bt_prio_boost,
412 sizeof(iwl_bt_prio_boost)); 631 sizeof(iwl_bt_prio_boost));
413 memcpy(&bt_cmd->bt4_multiprio_lut, iwl_bt_mprio_lut, 632 memcpy(&bt_cmd->bt4_multiprio_lut, iwl_bt_mprio_lut,
@@ -498,7 +717,7 @@ int iwl_mvm_bt_coex_reduced_txp(struct iwl_mvm *mvm, u8 sta_id, bool enable)
498 struct iwl_host_cmd cmd = { 717 struct iwl_host_cmd cmd = {
499 .id = BT_CONFIG, 718 .id = BT_CONFIG,
500 .len = { sizeof(*bt_cmd), }, 719 .len = { sizeof(*bt_cmd), },
501 .dataflags = { IWL_HCMD_DFL_DUP, }, 720 .dataflags = { IWL_HCMD_DFL_NOCOPY, },
502 .flags = CMD_ASYNC, 721 .flags = CMD_ASYNC,
503 }; 722 };
504 struct iwl_mvm_sta *mvmsta; 723 struct iwl_mvm_sta *mvmsta;
@@ -993,3 +1212,69 @@ void iwl_mvm_bt_coex_vif_change(struct iwl_mvm *mvm)
993 1212
994 iwl_mvm_bt_coex_notif_handle(mvm); 1213 iwl_mvm_bt_coex_notif_handle(mvm);
995} 1214}
1215
1216int iwl_mvm_rx_ant_coupling_notif(struct iwl_mvm *mvm,
1217 struct iwl_rx_cmd_buffer *rxb,
1218 struct iwl_device_cmd *dev_cmd)
1219{
1220 struct iwl_rx_packet *pkt = rxb_addr(rxb);
1221 u32 ant_isolation = le32_to_cpup((void *)pkt->data);
1222 u8 __maybe_unused lower_bound, upper_bound;
1223 u8 lut;
1224
1225 struct iwl_bt_coex_cmd *bt_cmd;
1226 struct iwl_host_cmd cmd = {
1227 .id = BT_CONFIG,
1228 .len = { sizeof(*bt_cmd), },
1229 .dataflags = { IWL_HCMD_DFL_NOCOPY, },
1230 .flags = CMD_SYNC,
1231 };
1232
1233 if (!IWL_MVM_BT_COEX_CORUNNING)
1234 return 0;
1235
1236 lockdep_assert_held(&mvm->mutex);
1237
1238 if (ant_isolation == mvm->last_ant_isol)
1239 return 0;
1240
1241 for (lut = 0; lut < ARRAY_SIZE(antenna_coupling_ranges) - 1; lut++)
1242 if (ant_isolation < antenna_coupling_ranges[lut + 1].range)
1243 break;
1244
1245 lower_bound = antenna_coupling_ranges[lut].range;
1246
1247 if (lut < ARRAY_SIZE(antenna_coupling_ranges) - 1)
1248 upper_bound = antenna_coupling_ranges[lut + 1].range;
1249 else
1250 upper_bound = antenna_coupling_ranges[lut].range;
1251
1252 IWL_DEBUG_COEX(mvm, "Antenna isolation=%d in range [%d,%d[, lut=%d\n",
1253 ant_isolation, lower_bound, upper_bound, lut);
1254
1255 mvm->last_ant_isol = ant_isolation;
1256
1257 if (mvm->last_corun_lut == lut)
1258 return 0;
1259
1260 mvm->last_corun_lut = lut;
1261
1262 bt_cmd = kzalloc(sizeof(*bt_cmd), GFP_KERNEL);
1263 if (!bt_cmd)
1264 return 0;
1265 cmd.data[0] = bt_cmd;
1266
1267 bt_cmd->flags = cpu_to_le32(BT_COEX_NW);
1268 bt_cmd->valid_bit_msk |= cpu_to_le32(BT_VALID_ENABLE |
1269 BT_VALID_CORUN_LUT_20 |
1270 BT_VALID_CORUN_LUT_40);
1271
1272 /* For the moment, use the same LUT for 20GHz and 40GHz */
1273 memcpy(bt_cmd->bt4_corun_lut20, antenna_coupling_ranges[lut].lut20,
1274 sizeof(bt_cmd->bt4_corun_lut20));
1275
1276 memcpy(bt_cmd->bt4_corun_lut40, antenna_coupling_ranges[lut].lut20,
1277 sizeof(bt_cmd->bt4_corun_lut40));
1278
1279 return 0;
1280}
diff --git a/drivers/net/wireless/iwlwifi/mvm/constants.h b/drivers/net/wireless/iwlwifi/mvm/constants.h
index 2d133b1b2dde..37d5f3594c4f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/constants.h
+++ b/drivers/net/wireless/iwlwifi/mvm/constants.h
@@ -82,5 +82,6 @@
82#define IWL_MVM_LOWLAT_SINGLE_BINDING_MAXDUR 24 /* TU */ 82#define IWL_MVM_LOWLAT_SINGLE_BINDING_MAXDUR 24 /* TU */
83#define IWL_MVM_LOWLAT_DUAL_BINDING_MAXDUR 24 /* TU */ 83#define IWL_MVM_LOWLAT_DUAL_BINDING_MAXDUR 24 /* TU */
84#define IWL_MVM_BT_COEX_SYNC2SCO 1 84#define IWL_MVM_BT_COEX_SYNC2SCO 1
85#define IWL_MVM_BT_COEX_CORUNNING 1
85 86
86#endif /* __MVM_CONSTANTS_H */ 87#endif /* __MVM_CONSTANTS_H */
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
index e3b42b4fa438..21ef8daede05 100644
--- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
@@ -350,6 +350,9 @@ static ssize_t iwl_dbgfs_bt_notif_read(struct file *file, char __user *user_buf,
350 le32_to_cpu(notif->secondary_ch_lut)); 350 le32_to_cpu(notif->secondary_ch_lut));
351 pos += scnprintf(buf+pos, bufsz-pos, "bt_activity_grading = %d\n", 351 pos += scnprintf(buf+pos, bufsz-pos, "bt_activity_grading = %d\n",
352 le32_to_cpu(notif->bt_activity_grading)); 352 le32_to_cpu(notif->bt_activity_grading));
353 pos += scnprintf(buf+pos, bufsz-pos,
354 "antenna isolation = %d CORUN LUT index = %d\n",
355 mvm->last_ant_isol, mvm->last_corun_lut);
353 356
354 mutex_unlock(&mvm->mutex); 357 mutex_unlock(&mvm->mutex);
355 358
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-bt-coex.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-bt-coex.h
index 20b723d6270f..32156d7e2d07 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-bt-coex.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-bt-coex.h
@@ -77,6 +77,7 @@
77 * @BT_COEX_3W: 77 * @BT_COEX_3W:
78 * @BT_COEX_NW: 78 * @BT_COEX_NW:
79 * @BT_COEX_SYNC2SCO: 79 * @BT_COEX_SYNC2SCO:
80 * @BT_COEX_CORUNNING:
80 * 81 *
81 * The COEX_MODE must be set for each command. Even if it is not changed. 82 * The COEX_MODE must be set for each command. Even if it is not changed.
82 */ 83 */
@@ -88,6 +89,7 @@ enum iwl_bt_coex_flags {
88 BT_COEX_3W = 0x2 << BT_COEX_MODE_POS, 89 BT_COEX_3W = 0x2 << BT_COEX_MODE_POS,
89 BT_COEX_NW = 0x3 << BT_COEX_MODE_POS, 90 BT_COEX_NW = 0x3 << BT_COEX_MODE_POS,
90 BT_COEX_SYNC2SCO = BIT(7), 91 BT_COEX_SYNC2SCO = BIT(7),
92 BT_COEX_CORUNNING = BIT(8),
91}; 93};
92 94
93/* 95/*
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api.h b/drivers/net/wireless/iwlwifi/mvm/fw-api.h
index 807fa525cafe..703168b7f63e 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api.h
@@ -95,6 +95,7 @@ enum {
95 /* PHY context commands */ 95 /* PHY context commands */
96 PHY_CONTEXT_CMD = 0x8, 96 PHY_CONTEXT_CMD = 0x8,
97 DBG_CFG = 0x9, 97 DBG_CFG = 0x9,
98 ANTENNA_COUPLING_NOTIFICATION = 0xa,
98 99
99 /* station table */ 100 /* station table */
100 ADD_STA_KEY = 0x17, 101 ADD_STA_KEY = 0x17,
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index e5c1db97acf4..18939dc06faf 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -597,6 +597,8 @@ struct iwl_mvm {
597 u8 bt_kill_msk; 597 u8 bt_kill_msk;
598 struct iwl_bt_coex_profile_notif last_bt_notif; 598 struct iwl_bt_coex_profile_notif last_bt_notif;
599 struct iwl_bt_coex_ci_cmd last_bt_ci_cmd; 599 struct iwl_bt_coex_ci_cmd last_bt_ci_cmd;
600 u32 last_ant_isol;
601 u8 last_corun_lut;
600 602
601 /* Thermal Throttling and CTkill */ 603 /* Thermal Throttling and CTkill */
602 struct iwl_mvm_tt_mgmt thermal_throttle; 604 struct iwl_mvm_tt_mgmt thermal_throttle;
@@ -750,6 +752,9 @@ int iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb,
750 struct iwl_device_cmd *cmd); 752 struct iwl_device_cmd *cmd);
751int iwl_mvm_rx_radio_ver(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, 753int iwl_mvm_rx_radio_ver(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb,
752 struct iwl_device_cmd *cmd); 754 struct iwl_device_cmd *cmd);
755int iwl_mvm_rx_ant_coupling_notif(struct iwl_mvm *mvm,
756 struct iwl_rx_cmd_buffer *rxb,
757 struct iwl_device_cmd *cmd);
753int iwl_mvm_rx_fw_error(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, 758int iwl_mvm_rx_fw_error(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb,
754 struct iwl_device_cmd *cmd); 759 struct iwl_device_cmd *cmd);
755int iwl_mvm_rx_card_state_notif(struct iwl_mvm *mvm, 760int iwl_mvm_rx_card_state_notif(struct iwl_mvm *mvm,
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c
index 39279e1d6ad4..75fbc4054173 100644
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -220,6 +220,8 @@ static const struct iwl_rx_handlers iwl_mvm_rx_handlers[] = {
220 RX_HANDLER(BT_PROFILE_NOTIFICATION, iwl_mvm_rx_bt_coex_notif, true), 220 RX_HANDLER(BT_PROFILE_NOTIFICATION, iwl_mvm_rx_bt_coex_notif, true),
221 RX_HANDLER(BEACON_NOTIFICATION, iwl_mvm_rx_beacon_notif, false), 221 RX_HANDLER(BEACON_NOTIFICATION, iwl_mvm_rx_beacon_notif, false),
222 RX_HANDLER(STATISTICS_NOTIFICATION, iwl_mvm_rx_statistics, true), 222 RX_HANDLER(STATISTICS_NOTIFICATION, iwl_mvm_rx_statistics, true),
223 RX_HANDLER(ANTENNA_COUPLING_NOTIFICATION,
224 iwl_mvm_rx_ant_coupling_notif, true),
223 225
224 RX_HANDLER(TIME_EVENT_NOTIFICATION, iwl_mvm_rx_time_event_notif, false), 226 RX_HANDLER(TIME_EVENT_NOTIFICATION, iwl_mvm_rx_time_event_notif, false),
225 227
@@ -321,6 +323,7 @@ static const char *const iwl_mvm_cmd_strings[REPLY_MAX] = {
321 CMD(MAC_PM_POWER_TABLE), 323 CMD(MAC_PM_POWER_TABLE),
322 CMD(BT_COEX_CI), 324 CMD(BT_COEX_CI),
323 CMD(PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION), 325 CMD(PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION),
326 CMD(ANTENNA_COUPLING_NOTIFICATION),
324}; 327};
325#undef CMD 328#undef CMD
326 329