wmi.c (3e7ee09d36a68a57721916899075396f7ed35a46) | wmi.c (9b586118730e1b86dc3c8d8523effc712c5a2bfc) |
---|---|
1/* 2 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. 3 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. 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 * --- 472 unchanged lines hidden (view full) --- 481 case WMI_FT_AUTH_CMDID: 482 return "WMI_FT_AUTH_CMD"; 483 case WMI_FT_REASSOC_CMDID: 484 return "WMI_FT_REASSOC_CMD"; 485 case WMI_UPDATE_FT_IES_CMDID: 486 return "WMI_UPDATE_FT_IES_CMD"; 487 case WMI_RBUFCAP_CFG_CMDID: 488 return "WMI_RBUFCAP_CFG_CMD"; | 1/* 2 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. 3 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. 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 * --- 472 unchanged lines hidden (view full) --- 481 case WMI_FT_AUTH_CMDID: 482 return "WMI_FT_AUTH_CMD"; 483 case WMI_FT_REASSOC_CMDID: 484 return "WMI_FT_REASSOC_CMD"; 485 case WMI_UPDATE_FT_IES_CMDID: 486 return "WMI_UPDATE_FT_IES_CMD"; 487 case WMI_RBUFCAP_CFG_CMDID: 488 return "WMI_RBUFCAP_CFG_CMD"; |
489 case WMI_TEMP_SENSE_ALL_CMDID: 490 return "WMI_TEMP_SENSE_ALL_CMDID"; |
|
489 default: 490 return "Untracked CMD"; 491 } 492} 493 494static const char *eventid2name(u16 eventid) 495{ 496 switch (eventid) { --- 130 unchanged lines hidden (view full) --- 627 case WMI_COMMAND_NOT_SUPPORTED_EVENTID: 628 return "WMI_COMMAND_NOT_SUPPORTED_EVENT"; 629 case WMI_FT_AUTH_STATUS_EVENTID: 630 return "WMI_FT_AUTH_STATUS_EVENT"; 631 case WMI_FT_REASSOC_STATUS_EVENTID: 632 return "WMI_FT_REASSOC_STATUS_EVENT"; 633 case WMI_RBUFCAP_CFG_EVENTID: 634 return "WMI_RBUFCAP_CFG_EVENT"; | 491 default: 492 return "Untracked CMD"; 493 } 494} 495 496static const char *eventid2name(u16 eventid) 497{ 498 switch (eventid) { --- 130 unchanged lines hidden (view full) --- 629 case WMI_COMMAND_NOT_SUPPORTED_EVENTID: 630 return "WMI_COMMAND_NOT_SUPPORTED_EVENT"; 631 case WMI_FT_AUTH_STATUS_EVENTID: 632 return "WMI_FT_AUTH_STATUS_EVENT"; 633 case WMI_FT_REASSOC_STATUS_EVENTID: 634 return "WMI_FT_REASSOC_STATUS_EVENT"; 635 case WMI_RBUFCAP_CFG_EVENTID: 636 return "WMI_RBUFCAP_CFG_EVENT"; |
637 case WMI_TEMP_SENSE_ALL_DONE_EVENTID: 638 return "WMI_TEMP_SENSE_ALL_DONE_EVENTID"; |
|
635 default: 636 return "Untracked EVENT"; 637 } 638} 639 640static int __wmi_send(struct wil6210_priv *wil, u16 cmdid, u8 mid, 641 void *buf, u16 len) 642{ --- 2000 unchanged lines hidden (view full) --- 2643 if (t_bb) 2644 *t_bb = le32_to_cpu(reply.evt.baseband_t1000); 2645 if (t_rf) 2646 *t_rf = le32_to_cpu(reply.evt.rf_t1000); 2647 2648 return 0; 2649} 2650 | 639 default: 640 return "Untracked EVENT"; 641 } 642} 643 644static int __wmi_send(struct wil6210_priv *wil, u16 cmdid, u8 mid, 645 void *buf, u16 len) 646{ --- 2000 unchanged lines hidden (view full) --- 2647 if (t_bb) 2648 *t_bb = le32_to_cpu(reply.evt.baseband_t1000); 2649 if (t_rf) 2650 *t_rf = le32_to_cpu(reply.evt.rf_t1000); 2651 2652 return 0; 2653} 2654 |
2655int wmi_get_all_temperatures(struct wil6210_priv *wil, 2656 struct wmi_temp_sense_all_done_event 2657 *sense_all_evt) 2658{ 2659 struct wil6210_vif *vif = ndev_to_vif(wil->main_ndev); 2660 int rc; 2661 struct wmi_temp_sense_all_cmd cmd = { 2662 .measure_baseband_en = true, 2663 .measure_rf_en = true, 2664 .measure_mode = TEMPERATURE_MEASURE_NOW, 2665 }; 2666 struct { 2667 struct wmi_cmd_hdr wmi; 2668 struct wmi_temp_sense_all_done_event evt; 2669 } __packed reply; 2670 2671 if (!sense_all_evt) { 2672 wil_err(wil, "Invalid sense_all_evt value\n"); 2673 return -EINVAL; 2674 } 2675 2676 memset(&reply, 0, sizeof(reply)); 2677 reply.evt.status = WMI_FW_STATUS_FAILURE; 2678 rc = wmi_call(wil, WMI_TEMP_SENSE_ALL_CMDID, vif->mid, &cmd, 2679 sizeof(cmd), WMI_TEMP_SENSE_ALL_DONE_EVENTID, 2680 &reply, sizeof(reply), WIL_WMI_CALL_GENERAL_TO_MS); 2681 if (rc) 2682 return rc; 2683 2684 if (reply.evt.status == WMI_FW_STATUS_FAILURE) { 2685 wil_err(wil, "Failed geting TEMP_SENSE_ALL\n"); 2686 return -EINVAL; 2687 } 2688 2689 memcpy(sense_all_evt, &reply.evt, sizeof(reply.evt)); 2690 return 0; 2691} 2692 |
|
2651int wmi_disconnect_sta(struct wil6210_vif *vif, const u8 *mac, u16 reason, 2652 bool del_sta) 2653{ 2654 struct wil6210_priv *wil = vif_to_wil(vif); 2655 int rc; 2656 struct wmi_disconnect_sta_cmd disc_sta_cmd = { 2657 .disconnect_reason = cpu_to_le16(reason), 2658 }; --- 1248 unchanged lines hidden --- | 2693int wmi_disconnect_sta(struct wil6210_vif *vif, const u8 *mac, u16 reason, 2694 bool del_sta) 2695{ 2696 struct wil6210_priv *wil = vif_to_wil(vif); 2697 int rc; 2698 struct wmi_disconnect_sta_cmd disc_sta_cmd = { 2699 .disconnect_reason = cpu_to_le16(reason), 2700 }; --- 1248 unchanged lines hidden --- |