Lines Matching refs:info

62 wifi_handle getWifiHandle(hal_info *info)  in getWifiHandle()  argument
64 return (wifi_handle)info; in getWifiHandle()
67 wifi_interface_handle getIfaceHandle(interface_info *info) in getIfaceHandle() argument
69 return (wifi_interface_handle)info; in getIfaceHandle()
74 hal_info *info = (hal_info *)handle; in wifi_register_handler() local
77 pthread_mutex_lock(&info->cb_lock); in wifi_register_handler()
81 if (info->num_event_cb < info->alloc_event_cb) { in wifi_register_handler()
82 info->event_cb[info->num_event_cb].nl_cmd = cmd; in wifi_register_handler()
83 info->event_cb[info->num_event_cb].vendor_id = 0; in wifi_register_handler()
84 info->event_cb[info->num_event_cb].vendor_subcmd = 0; in wifi_register_handler()
85 info->event_cb[info->num_event_cb].cb_func = func; in wifi_register_handler()
86 info->event_cb[info->num_event_cb].cb_arg = arg; in wifi_register_handler()
88 arg, func, cmd, info->num_event_cb); in wifi_register_handler()
89 info->num_event_cb++; in wifi_register_handler()
93 pthread_mutex_unlock(&info->cb_lock); in wifi_register_handler()
100 hal_info *info = (hal_info *)handle; in wifi_register_vendor_handler() local
103 pthread_mutex_lock(&info->cb_lock); in wifi_register_vendor_handler()
107 if (info->num_event_cb < info->alloc_event_cb) { in wifi_register_vendor_handler()
108 info->event_cb[info->num_event_cb].nl_cmd = NL80211_CMD_VENDOR; in wifi_register_vendor_handler()
109 info->event_cb[info->num_event_cb].vendor_id = id; in wifi_register_vendor_handler()
110 info->event_cb[info->num_event_cb].vendor_subcmd = subcmd; in wifi_register_vendor_handler()
111 info->event_cb[info->num_event_cb].cb_func = func; in wifi_register_vendor_handler()
112 info->event_cb[info->num_event_cb].cb_arg = arg; in wifi_register_vendor_handler()
114 arg, func, id, subcmd, info->num_event_cb); in wifi_register_vendor_handler()
115 info->num_event_cb++; in wifi_register_vendor_handler()
119 pthread_mutex_unlock(&info->cb_lock); in wifi_register_vendor_handler()
125 hal_info *info = (hal_info *)handle; in wifi_unregister_handler() local
132 pthread_mutex_lock(&info->cb_lock); in wifi_unregister_handler()
134 for (int i = 0; i < info->num_event_cb; i++) { in wifi_unregister_handler()
135 if (info->event_cb[i].nl_cmd == cmd) { in wifi_unregister_handler()
137 info->event_cb[i].cb_arg, info->event_cb[i].cb_func, cmd, i); in wifi_unregister_handler()
139 memmove(&info->event_cb[i], &info->event_cb[i+1], in wifi_unregister_handler()
140 (info->num_event_cb - i - 1) * sizeof(cb_info)); in wifi_unregister_handler()
141 info->num_event_cb--; in wifi_unregister_handler()
146 pthread_mutex_unlock(&info->cb_lock); in wifi_unregister_handler()
151 hal_info *info = (hal_info *)handle; in wifi_unregister_vendor_handler() local
153 pthread_mutex_lock(&info->cb_lock); in wifi_unregister_vendor_handler()
155 for (int i = 0; i < info->num_event_cb; i++) { in wifi_unregister_vendor_handler()
157 if (info->event_cb[i].nl_cmd == NL80211_CMD_VENDOR in wifi_unregister_vendor_handler()
158 && info->event_cb[i].vendor_id == id in wifi_unregister_vendor_handler()
159 && info->event_cb[i].vendor_subcmd == subcmd) { in wifi_unregister_vendor_handler()
161 info->event_cb[i].cb_arg, info->event_cb[i].cb_func, id, subcmd, i); in wifi_unregister_vendor_handler()
162 memmove(&info->event_cb[i], &info->event_cb[i+1], in wifi_unregister_vendor_handler()
163 (info->num_event_cb - i - 1) * sizeof(cb_info)); in wifi_unregister_vendor_handler()
164 info->num_event_cb--; in wifi_unregister_vendor_handler()
169 pthread_mutex_unlock(&info->cb_lock); in wifi_unregister_vendor_handler()
175 hal_info *info = (hal_info *)handle; in wifi_register_cmd() local
181 if (info->num_cmd < info->alloc_cmd) { in wifi_register_cmd()
182 info->cmd[info->num_cmd].id = id; in wifi_register_cmd()
183 info->cmd[info->num_cmd].cmd = cmd; in wifi_register_cmd()
184 ALOGV("Successfully added command %d: %p at %d", id, cmd, info->num_cmd); in wifi_register_cmd()
185 info->num_cmd++; in wifi_register_cmd()
189 id, cmd, info->num_cmd, info->alloc_cmd); in wifi_register_cmd()
197 hal_info *info = (hal_info *)handle; in wifi_unregister_cmd() local
203 for (int i = 0; i < info->num_cmd; i++) { in wifi_unregister_cmd()
204 if (info->cmd[i].id == id) { in wifi_unregister_cmd()
205 cmd = info->cmd[i].cmd; in wifi_unregister_cmd()
206 memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i - 1) * sizeof(cmd_info)); in wifi_unregister_cmd()
207 info->num_cmd--; in wifi_unregister_cmd()
222 hal_info *info = (hal_info *)handle; in wifi_get_cmd() local
226 for (int i = 0; i < info->num_cmd; i++) { in wifi_get_cmd()
227 if (info->cmd[i].id == id) { in wifi_get_cmd()
228 cmd = info->cmd[i].cmd; in wifi_get_cmd()
238 hal_info *info = (hal_info *)handle; in wifi_unregister_cmd() local
240 for (int i = 0; i < info->num_cmd; i++) { in wifi_unregister_cmd()
241 if (info->cmd[i].cmd == cmd) { in wifi_unregister_cmd()
242 int id = info->cmd[i].id; in wifi_unregister_cmd()
243 memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i - 1) * sizeof(cmd_info)); in wifi_unregister_cmd()
244 info->num_cmd--; in wifi_unregister_cmd()