Lines Matching defs:info
147 hal_info *info = (hal_info *)malloc(sizeof(hal_info));
148 if (info == NULL) {
153 memset(info, 0, sizeof(*info));
181 nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, internal_valid_message_handler, info);
184 info->cmd_sock = cmd_sock;
185 info->event_sock = event_sock;
186 info->clean_up = false;
187 info->in_event_loop = false;
189 info->event_cb = (cb_info *)malloc(sizeof(cb_info) * DEFAULT_EVENT_CB_SIZE);
190 info->alloc_event_cb = DEFAULT_EVENT_CB_SIZE;
191 info->num_event_cb = 0;
193 info->cmd = (cmd_info *)malloc(sizeof(cmd_info) * DEFAULT_CMD_SIZE);
194 info->alloc_cmd = DEFAULT_CMD_SIZE;
195 info->num_cmd = 0;
197 info->nl80211_family_id = genl_ctrl_resolve(cmd_sock, "nl80211");
198 if (info->nl80211_family_id < 0) {
202 free(info);
205 ALOGI("%s: family_id:%d", __func__, info->nl80211_family_id);
207 *handle = (wifi_handle) info;
215 // ALOGI("Found %d interfaces", info->num_interfaces);
224 hal_info *info = getHalInfo(handle);
232 int ret = nl_socket_add_membership(info->event_sock, id);
243 hal_info *info = getHalInfo(handle);
244 wifi_cleaned_up_handler cleaned_up_handler = info->cleaned_up_handler;
246 if (info->cmd_sock != 0) {
247 nl_socket_free(info->cmd_sock);
248 nl_socket_free(info->event_sock);
249 info->cmd_sock = NULL;
250 info->event_sock = NULL;
254 free(info);
261 hal_info *info = getHalInfo(handle);
262 info->cleaned_up_handler = handler;
263 info->clean_up = true;
270 hal_info *info = getHalInfo(handle);
271 struct nl_cb *cb = nl_socket_get_cb(info->event_sock);
272 int res = nl_recvmsgs(info->event_sock, cb);
294 hal_info *info = getHalInfo(handle);
295 if (info->in_event_loop) {
298 info->in_event_loop = true;
304 pfd.fd = nl_socket_get_fd(info->event_sock);
320 } while (!info->clean_up);
332 hal_info *info = getHalInfo(handle);
358 for (int i = 0; i < info->num_event_cb; i++) {
359 if (cmd == info->event_cb[i].nl_cmd) {
361 && ((vendor_id != info->event_cb[i].vendor_id)
362 || (subcmd != info->event_cb[i].vendor_subcmd)))
368 cb_info *cbi = &(info->event_cb[i]);
478 static int get_interface(const char *name, interface_info *info)
480 strcpy(info->name, name);
481 info->id = if_nametoindex(name);
482 // ALOGI("found an interface : %s, id = %d", name, info->id);
488 hal_info *info = (hal_info *)handle;
511 info->interfaces = (interface_info **)malloc(sizeof(interface_info *) * n);
524 info->interfaces[i] = ifinfo;
531 info->num_interfaces = n;
537 hal_info *info = (hal_info *)handle;
539 *interfaces = (wifi_interface_handle *)info->interfaces;
540 *num = info->num_interfaces;
547 interface_info *info = (interface_info *)handle;
548 strcpy(name, info->name);
554 hal_info *info = (hal_info *)handle;
555 for (int i=0;i<info->num_interfaces;i++)
557 if (!strcmp(info->interfaces[i]->name, name))
559 return ((wifi_interface_handle )(info->interfaces)[i]);