wmi.c (060337604577e55c5bf3246bcaf161929c603d54) | wmi.c (f195d5076a734c6d96a0dd80fe2a3b1e608e7979) |
---|---|
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 --- 1171 unchanged lines hidden (view full) --- 1180 * which is done in ath6kl_wlan_parse_beacon 1181 */ 1182 bss->ni_cie.ie_chan = le16_to_cpu(bih->ch); 1183 wlan_setup_node(&wmi->parent_dev->scan_table, bss, bih->bssid); 1184 1185 return 0; 1186} 1187 | 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 --- 1171 unchanged lines hidden (view full) --- 1180 * which is done in ath6kl_wlan_parse_beacon 1181 */ 1182 bss->ni_cie.ie_chan = le16_to_cpu(bih->ch); 1183 wlan_setup_node(&wmi->parent_dev->scan_table, bss, bih->bssid); 1184 1185 return 0; 1186} 1187 |
1188static int ath6kl_wmi_opt_frame_event_rx(struct wmi *wmi, u8 *datap, int len) 1189{ 1190 struct bss *bss; 1191 struct wmi_opt_rx_info_hdr *bih; 1192 u8 *buf; 1193 1194 if (len <= sizeof(struct wmi_opt_rx_info_hdr)) 1195 return -EINVAL; 1196 1197 bih = (struct wmi_opt_rx_info_hdr *) datap; 1198 buf = datap + sizeof(struct wmi_opt_rx_info_hdr); 1199 len -= sizeof(struct wmi_opt_rx_info_hdr); 1200 1201 ath6kl_dbg(ATH6KL_DBG_WMI, "opt frame event %2.2x:%2.2x\n", 1202 bih->bssid[4], bih->bssid[5]); 1203 1204 bss = wlan_find_node(&wmi->parent_dev->scan_table, bih->bssid); 1205 if (bss != NULL) { 1206 /* Free up the node. We are about to allocate a new node. */ 1207 wlan_node_reclaim(&wmi->parent_dev->scan_table, bss); 1208 } 1209 1210 bss = wlan_node_alloc(len); 1211 if (!bss) 1212 return -ENOMEM; 1213 1214 bss->ni_snr = bih->snr; 1215 bss->ni_cie.ie_chan = le16_to_cpu(bih->ch); 1216 1217 if (WARN_ON(!bss->ni_buf)) 1218 return -EINVAL; 1219 1220 memcpy(bss->ni_buf, buf, len); 1221 wlan_setup_node(&wmi->parent_dev->scan_table, bss, bih->bssid); 1222 1223 return 0; 1224} 1225 | |
1226/* Inactivity timeout of a fatpipe(pstream) at the target */ 1227static int ath6kl_wmi_pstream_timeout_event_rx(struct wmi *wmi, u8 *datap, 1228 int len) 1229{ 1230 struct wmi_pstream_timeout_event *ev; 1231 1232 if (len < sizeof(struct wmi_pstream_timeout_event)) 1233 return -EINVAL; --- 1936 unchanged lines hidden (view full) --- 3170 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RSSI_THRESHOLD_EVENTID\n"); 3171 ret = ath6kl_wmi_rssi_threshold_event_rx(wmi, datap, len); 3172 break; 3173 case WMI_ERROR_REPORT_EVENTID: 3174 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_ERROR_REPORT_EVENTID\n"); 3175 break; 3176 case WMI_OPT_RX_FRAME_EVENTID: 3177 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_OPT_RX_FRAME_EVENTID\n"); | 1188/* Inactivity timeout of a fatpipe(pstream) at the target */ 1189static int ath6kl_wmi_pstream_timeout_event_rx(struct wmi *wmi, u8 *datap, 1190 int len) 1191{ 1192 struct wmi_pstream_timeout_event *ev; 1193 1194 if (len < sizeof(struct wmi_pstream_timeout_event)) 1195 return -EINVAL; --- 1936 unchanged lines hidden (view full) --- 3132 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RSSI_THRESHOLD_EVENTID\n"); 3133 ret = ath6kl_wmi_rssi_threshold_event_rx(wmi, datap, len); 3134 break; 3135 case WMI_ERROR_REPORT_EVENTID: 3136 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_ERROR_REPORT_EVENTID\n"); 3137 break; 3138 case WMI_OPT_RX_FRAME_EVENTID: 3139 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_OPT_RX_FRAME_EVENTID\n"); |
3178 ret = ath6kl_wmi_opt_frame_event_rx(wmi, datap, len); | 3140 /* this event has been deprecated */ |
3179 break; 3180 case WMI_REPORT_ROAM_TBL_EVENTID: 3181 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REPORT_ROAM_TBL_EVENTID\n"); 3182 break; 3183 case WMI_EXTENSION_EVENTID: 3184 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_EXTENSION_EVENTID\n"); 3185 ret = ath6kl_wmi_control_rx_xtnd(wmi, skb); 3186 break; --- 167 unchanged lines hidden --- | 3141 break; 3142 case WMI_REPORT_ROAM_TBL_EVENTID: 3143 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REPORT_ROAM_TBL_EVENTID\n"); 3144 break; 3145 case WMI_EXTENSION_EVENTID: 3146 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_EXTENSION_EVENTID\n"); 3147 ret = ath6kl_wmi_control_rx_xtnd(wmi, skb); 3148 break; --- 167 unchanged lines hidden --- |