aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/wmi.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-08-04 02:18:33 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2014-08-12 03:42:24 -0400
commitcff990ce7ddd6a43f86757867399a8a64aa29af9 (patch)
tree35ad2395674acefba4e6822a0773a9219c1cf8af /drivers/net/wireless/ath/ath10k/wmi.c
parent17dc0b8068f9f01c56b0ade5c36b4c45a3339dda (diff)
ath10k: fix wmi service bitmap debug
The 10.x and main firmware branches have conflicting WMI service bitmap definitions. This also fixes WMI services parsing on big-endian hosts and changes debugfs output to be more human friendly. kvalo: remove braces and the last semicolon from SVCSTR() Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/wmi.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index fffb15b1b50b..a381006c8124 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -2080,6 +2080,7 @@ static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar,
2080 struct sk_buff *skb) 2080 struct sk_buff *skb)
2081{ 2081{
2082 struct wmi_service_ready_event *ev = (void *)skb->data; 2082 struct wmi_service_ready_event *ev = (void *)skb->data;
2083 DECLARE_BITMAP(svc_bmap, WMI_SERVICE_BM_SIZE) = {};
2083 2084
2084 if (skb->len < sizeof(*ev)) { 2085 if (skb->len < sizeof(*ev)) {
2085 ath10k_warn("Service ready event was %d B but expected %zu B. Wrong firmware version?\n", 2086 ath10k_warn("Service ready event was %d B but expected %zu B. Wrong firmware version?\n",
@@ -2113,8 +2114,10 @@ static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar,
2113 ar->ath_common.regulatory.current_rd = 2114 ar->ath_common.regulatory.current_rd =
2114 __le32_to_cpu(ev->hal_reg_capabilities.eeprom_rd); 2115 __le32_to_cpu(ev->hal_reg_capabilities.eeprom_rd);
2115 2116
2116 ath10k_debug_read_service_map(ar, ev->wmi_service_bitmap, 2117 wmi_10x_svc_map(ev->wmi_service_bitmap, svc_bmap);
2117 sizeof(ev->wmi_service_bitmap)); 2118 ath10k_debug_read_service_map(ar, svc_bmap, sizeof(svc_bmap));
2119 ath10k_dbg_dump(ATH10K_DBG_WMI, NULL, "ath10k: wmi svc: ",
2120 ev->wmi_service_bitmap, sizeof(ev->wmi_service_bitmap));
2118 2121
2119 if (strlen(ar->hw->wiphy->fw_version) == 0) { 2122 if (strlen(ar->hw->wiphy->fw_version) == 0) {
2120 snprintf(ar->hw->wiphy->fw_version, 2123 snprintf(ar->hw->wiphy->fw_version,
@@ -2154,6 +2157,7 @@ static void ath10k_wmi_10x_service_ready_event_rx(struct ath10k *ar,
2154 u32 num_units, req_id, unit_size, num_mem_reqs, num_unit_info, i; 2157 u32 num_units, req_id, unit_size, num_mem_reqs, num_unit_info, i;
2155 int ret; 2158 int ret;
2156 struct wmi_service_ready_event_10x *ev = (void *)skb->data; 2159 struct wmi_service_ready_event_10x *ev = (void *)skb->data;
2160 DECLARE_BITMAP(svc_bmap, WMI_SERVICE_BM_SIZE) = {};
2157 2161
2158 if (skb->len < sizeof(*ev)) { 2162 if (skb->len < sizeof(*ev)) {
2159 ath10k_warn("Service ready event was %d B but expected %zu B. Wrong firmware version?\n", 2163 ath10k_warn("Service ready event was %d B but expected %zu B. Wrong firmware version?\n",
@@ -2180,8 +2184,10 @@ static void ath10k_wmi_10x_service_ready_event_rx(struct ath10k *ar,
2180 ar->ath_common.regulatory.current_rd = 2184 ar->ath_common.regulatory.current_rd =
2181 __le32_to_cpu(ev->hal_reg_capabilities.eeprom_rd); 2185 __le32_to_cpu(ev->hal_reg_capabilities.eeprom_rd);
2182 2186
2183 ath10k_debug_read_service_map(ar, ev->wmi_service_bitmap, 2187 wmi_main_svc_map(ev->wmi_service_bitmap, svc_bmap);
2184 sizeof(ev->wmi_service_bitmap)); 2188 ath10k_debug_read_service_map(ar, svc_bmap, sizeof(svc_bmap));
2189 ath10k_dbg_dump(ATH10K_DBG_WMI, NULL, "ath10k: wmi svc: ",
2190 ev->wmi_service_bitmap, sizeof(ev->wmi_service_bitmap));
2185 2191
2186 if (strlen(ar->hw->wiphy->fw_version) == 0) { 2192 if (strlen(ar->hw->wiphy->fw_version) == 0) {
2187 snprintf(ar->hw->wiphy->fw_version, 2193 snprintf(ar->hw->wiphy->fw_version,