wmi.c (32c1087460626f9cfa2b397eafd247bf039bacac) wmi.c (865121361f0be55555c540c3df444ed06e090b33)
1/*
2 * Copyright (c) 2004-2011 Atheros Communications Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

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

1092 ev = (struct wmi_scan_complete_event *) datap;
1093
1094 ath6kl_scan_complete_evt(wmi->parent_dev, a_sle32_to_cpu(ev->status));
1095 wmi->is_probe_ssid = false;
1096
1097 return 0;
1098}
1099
1/*
2 * Copyright (c) 2004-2011 Atheros Communications Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

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

1092 ev = (struct wmi_scan_complete_event *) datap;
1093
1094 ath6kl_scan_complete_evt(wmi->parent_dev, a_sle32_to_cpu(ev->status));
1095 wmi->is_probe_ssid = false;
1096
1097 return 0;
1098}
1099
1100static int ath6kl_wmi_neighbor_report_event_rx(struct wmi *wmi, u8 *datap,
1101 int len)
1102{
1103 struct wmi_neighbor_report_event *ev;
1104 u8 i;
1105
1106 if (len < sizeof(*ev))
1107 return -EINVAL;
1108 ev = (struct wmi_neighbor_report_event *) datap;
1109 if (sizeof(*ev) + ev->num_neighbors * sizeof(struct wmi_neighbor_info)
1110 > len) {
1111 ath6kl_dbg(ATH6KL_DBG_WMI, "truncated neighbor event "
1112 "(num=%d len=%d)\n", ev->num_neighbors, len);
1113 return -EINVAL;
1114 }
1115 for (i = 0; i < ev->num_neighbors; i++) {
1116 ath6kl_dbg(ATH6KL_DBG_WMI, "neighbor %d/%d - %pM 0x%x\n",
1117 i + 1, ev->num_neighbors, ev->neighbor[i].bssid,
1118 ev->neighbor[i].bss_flags);
1119 cfg80211_pmksa_candidate_notify(wmi->parent_dev->net_dev, i,
1120 ev->neighbor[i].bssid,
1121 !!(ev->neighbor[i].bss_flags &
1122 WMI_PREAUTH_CAPABLE_BSS),
1123 GFP_ATOMIC);
1124 }
1125
1126 return 0;
1127}
1128
1100/*
1101 * Target is reporting a programming error. This is for
1102 * developer aid only. Target only checks a few common violations
1103 * and it is responsibility of host to do all error checking.
1104 * Behavior of target after wmi error event is undefined.
1105 * A reset is recommended.
1106 */
1107static int ath6kl_wmi_error_event_rx(struct wmi *wmi, u8 *datap, int len)

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

2865 ath6kl_wmi_regdomain_event(wmi, datap, len);
2866 break;
2867 case WMI_PSTREAM_TIMEOUT_EVENTID:
2868 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PSTREAM_TIMEOUT_EVENTID\n");
2869 ret = ath6kl_wmi_pstream_timeout_event_rx(wmi, datap, len);
2870 break;
2871 case WMI_NEIGHBOR_REPORT_EVENTID:
2872 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_NEIGHBOR_REPORT_EVENTID\n");
1129/*
1130 * Target is reporting a programming error. This is for
1131 * developer aid only. Target only checks a few common violations
1132 * and it is responsibility of host to do all error checking.
1133 * Behavior of target after wmi error event is undefined.
1134 * A reset is recommended.
1135 */
1136static int ath6kl_wmi_error_event_rx(struct wmi *wmi, u8 *datap, int len)

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

2894 ath6kl_wmi_regdomain_event(wmi, datap, len);
2895 break;
2896 case WMI_PSTREAM_TIMEOUT_EVENTID:
2897 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PSTREAM_TIMEOUT_EVENTID\n");
2898 ret = ath6kl_wmi_pstream_timeout_event_rx(wmi, datap, len);
2899 break;
2900 case WMI_NEIGHBOR_REPORT_EVENTID:
2901 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_NEIGHBOR_REPORT_EVENTID\n");
2902 ret = ath6kl_wmi_neighbor_report_event_rx(wmi, datap, len);
2873 break;
2874 case WMI_SCAN_COMPLETE_EVENTID:
2875 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_SCAN_COMPLETE_EVENTID\n");
2876 ret = ath6kl_wmi_scan_complete_rx(wmi, datap, len);
2877 break;
2878 case WMI_CMDERROR_EVENTID:
2879 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CMDERROR_EVENTID\n");
2880 ret = ath6kl_wmi_error_event_rx(wmi, datap, len);

--- 190 unchanged lines hidden ---
2903 break;
2904 case WMI_SCAN_COMPLETE_EVENTID:
2905 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_SCAN_COMPLETE_EVENTID\n");
2906 ret = ath6kl_wmi_scan_complete_rx(wmi, datap, len);
2907 break;
2908 case WMI_CMDERROR_EVENTID:
2909 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CMDERROR_EVENTID\n");
2910 ret = ath6kl_wmi_error_event_rx(wmi, datap, len);

--- 190 unchanged lines hidden ---