Lines Matching refs:info

42 wifi_handle getWifiHandle(hal_info *info)  in getWifiHandle()  argument
44 return (wifi_handle)info; in getWifiHandle()
47 wifi_interface_handle getIfaceHandle(interface_info *info) in getIfaceHandle() argument
49 return (wifi_interface_handle)info; in getIfaceHandle()
54 hal_info *info = (hal_info *)handle; in wifi_register_handler() local
57 pthread_mutex_lock(&info->cb_lock); in wifi_register_handler()
61 if (info->num_event_cb < info->alloc_event_cb) { in wifi_register_handler()
62 info->event_cb[info->num_event_cb].nl_cmd = cmd; in wifi_register_handler()
63 info->event_cb[info->num_event_cb].vendor_id = 0; in wifi_register_handler()
64 info->event_cb[info->num_event_cb].vendor_subcmd = 0; in wifi_register_handler()
65 info->event_cb[info->num_event_cb].cb_func = func; in wifi_register_handler()
66 info->event_cb[info->num_event_cb].cb_arg = arg; in wifi_register_handler()
68 arg, func, cmd, info->num_event_cb); in wifi_register_handler()
69 info->num_event_cb++; in wifi_register_handler()
73 pthread_mutex_unlock(&info->cb_lock); in wifi_register_handler()
80 hal_info *info = (hal_info *)handle; in wifi_register_vendor_handler() local
83 pthread_mutex_lock(&info->cb_lock); in wifi_register_vendor_handler()
87 if (info->num_event_cb < info->alloc_event_cb) { in wifi_register_vendor_handler()
88 info->event_cb[info->num_event_cb].nl_cmd = NL80211_CMD_VENDOR; in wifi_register_vendor_handler()
89 info->event_cb[info->num_event_cb].vendor_id = id; in wifi_register_vendor_handler()
90 info->event_cb[info->num_event_cb].vendor_subcmd = subcmd; in wifi_register_vendor_handler()
91 info->event_cb[info->num_event_cb].cb_func = func; in wifi_register_vendor_handler()
92 info->event_cb[info->num_event_cb].cb_arg = arg; in wifi_register_vendor_handler()
94 arg, func, id, subcmd, info->num_event_cb); in wifi_register_vendor_handler()
95 info->num_event_cb++; in wifi_register_vendor_handler()
99 pthread_mutex_unlock(&info->cb_lock); in wifi_register_vendor_handler()
105 hal_info *info = (hal_info *)handle; in wifi_unregister_handler() local
112 pthread_mutex_lock(&info->cb_lock); in wifi_unregister_handler()
114 for (int i = 0; i < info->num_event_cb; i++) { in wifi_unregister_handler()
115 if (info->event_cb[i].nl_cmd == cmd) { in wifi_unregister_handler()
117 info->event_cb[i].cb_arg, info->event_cb[i].cb_func, cmd, i); in wifi_unregister_handler()
119 memmove(&info->event_cb[i], &info->event_cb[i+1], in wifi_unregister_handler()
120 (info->num_event_cb - i - 1) * sizeof(cb_info)); in wifi_unregister_handler()
121 info->num_event_cb--; in wifi_unregister_handler()
126 pthread_mutex_unlock(&info->cb_lock); in wifi_unregister_handler()
131 hal_info *info = (hal_info *)handle; in wifi_unregister_vendor_handler() local
133 pthread_mutex_lock(&info->cb_lock); in wifi_unregister_vendor_handler()
135 for (int i = 0; i < info->num_event_cb; i++) { in wifi_unregister_vendor_handler()
137 if (info->event_cb[i].nl_cmd == NL80211_CMD_VENDOR in wifi_unregister_vendor_handler()
138 && info->event_cb[i].vendor_id == id in wifi_unregister_vendor_handler()
139 && info->event_cb[i].vendor_subcmd == subcmd) { in wifi_unregister_vendor_handler()
141 info->event_cb[i].cb_arg, info->event_cb[i].cb_func, id, subcmd, i); in wifi_unregister_vendor_handler()
142 memmove(&info->event_cb[i], &info->event_cb[i+1], in wifi_unregister_vendor_handler()
143 (info->num_event_cb - i - 1) * sizeof(cb_info)); in wifi_unregister_vendor_handler()
144 info->num_event_cb--; in wifi_unregister_vendor_handler()
149 pthread_mutex_unlock(&info->cb_lock); in wifi_unregister_vendor_handler()
155 hal_info *info = (hal_info *)handle; in wifi_register_cmd() local
161 if (info->num_cmd < info->alloc_cmd) { in wifi_register_cmd()
162 info->cmd[info->num_cmd].id = id; in wifi_register_cmd()
163 info->cmd[info->num_cmd].cmd = cmd; in wifi_register_cmd()
164 ALOGV("Successfully added command %d: %p at %d", id, cmd, info->num_cmd); in wifi_register_cmd()
165 info->num_cmd++; in wifi_register_cmd()
169 id, cmd, info->num_cmd, info->alloc_cmd); in wifi_register_cmd()
177 hal_info *info = (hal_info *)handle; in wifi_unregister_cmd() local
183 for (int i = 0; i < info->num_cmd; i++) { in wifi_unregister_cmd()
184 if (info->cmd[i].id == id) { in wifi_unregister_cmd()
185 cmd = info->cmd[i].cmd; in wifi_unregister_cmd()
186 memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i - 1) * sizeof(cmd_info)); in wifi_unregister_cmd()
187 info->num_cmd--; in wifi_unregister_cmd()
202 hal_info *info = (hal_info *)handle; in wifi_get_cmd() local
206 for (int i = 0; i < info->num_cmd; i++) { in wifi_get_cmd()
207 if (info->cmd[i].id == id) { in wifi_get_cmd()
208 cmd = info->cmd[i].cmd; in wifi_get_cmd()
218 hal_info *info = (hal_info *)handle; in wifi_unregister_cmd() local
220 for (int i = 0; i < info->num_cmd; i++) { in wifi_unregister_cmd()
221 if (info->cmd[i].cmd == cmd) { in wifi_unregister_cmd()
222 int id = info->cmd[i].id; in wifi_unregister_cmd()
223 memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i - 1) * sizeof(cmd_info)); in wifi_unregister_cmd()
224 info->num_cmd--; in wifi_unregister_cmd()