Lines Matching refs:info
47 wifi_handle getWifiHandle(hal_info *info) in getWifiHandle() argument
49 return (wifi_handle)info; in getWifiHandle()
52 wifi_interface_handle getIfaceHandle(interface_info *info) in getIfaceHandle() argument
54 return (wifi_interface_handle)info; in getIfaceHandle()
59 hal_info *info = (hal_info *)handle; in wifi_register_handler() local
61 pthread_mutex_lock(&info->cb_lock); in wifi_register_handler()
65 for (int i = 0; i < info->num_event_cb; i++) { in wifi_register_handler()
66 if(info->event_cb[i].nl_cmd == cmd && in wifi_register_handler()
67 info->event_cb[i].cb_arg == arg) { in wifi_register_handler()
68 info->event_cb[i].cb_func = func; in wifi_register_handler()
71 pthread_mutex_unlock(&info->cb_lock); in wifi_register_handler()
76 if (info->num_event_cb < info->alloc_event_cb) { in wifi_register_handler()
77 info->event_cb[info->num_event_cb].nl_cmd = cmd; in wifi_register_handler()
78 info->event_cb[info->num_event_cb].vendor_id = 0; in wifi_register_handler()
79 info->event_cb[info->num_event_cb].vendor_subcmd = 0; in wifi_register_handler()
80 info->event_cb[info->num_event_cb].cb_func = func; in wifi_register_handler()
81 info->event_cb[info->num_event_cb].cb_arg = arg; in wifi_register_handler()
82 info->num_event_cb++; in wifi_register_handler()
89 pthread_mutex_unlock(&info->cb_lock); in wifi_register_handler()
96 hal_info *info = (hal_info *)handle; in wifi_register_vendor_handler() local
98 pthread_mutex_lock(&info->cb_lock); in wifi_register_vendor_handler()
102 for (int i = 0; i < info->num_event_cb; i++) { in wifi_register_vendor_handler()
103 if(info->event_cb[i].vendor_id == id && in wifi_register_vendor_handler()
104 info->event_cb[i].vendor_subcmd == subcmd) in wifi_register_vendor_handler()
106 info->event_cb[i].cb_func = func; in wifi_register_vendor_handler()
107 info->event_cb[i].cb_arg = arg; in wifi_register_vendor_handler()
110 pthread_mutex_unlock(&info->cb_lock); in wifi_register_vendor_handler()
115 if (info->num_event_cb < info->alloc_event_cb) { in wifi_register_vendor_handler()
116 info->event_cb[info->num_event_cb].nl_cmd = NL80211_CMD_VENDOR; in wifi_register_vendor_handler()
117 info->event_cb[info->num_event_cb].vendor_id = id; in wifi_register_vendor_handler()
118 info->event_cb[info->num_event_cb].vendor_subcmd = subcmd; in wifi_register_vendor_handler()
119 info->event_cb[info->num_event_cb].cb_func = func; in wifi_register_vendor_handler()
120 info->event_cb[info->num_event_cb].cb_arg = arg; in wifi_register_vendor_handler()
121 info->num_event_cb++; in wifi_register_vendor_handler()
129 pthread_mutex_unlock(&info->cb_lock); in wifi_register_vendor_handler()
135 hal_info *info = (hal_info *)handle; in wifi_unregister_handler() local
142 pthread_mutex_lock(&info->cb_lock); in wifi_unregister_handler()
144 for (int i = 0; i < info->num_event_cb; i++) { in wifi_unregister_handler()
145 if (info->event_cb[i].nl_cmd == cmd) { in wifi_unregister_handler()
146 if(i < info->num_event_cb-1) { in wifi_unregister_handler()
150 memmove(&info->event_cb[i], &info->event_cb[i+1], in wifi_unregister_handler()
151 (info->num_event_cb - i) * sizeof(cb_info)); in wifi_unregister_handler()
153 info->num_event_cb--; in wifi_unregister_handler()
159 pthread_mutex_unlock(&info->cb_lock); in wifi_unregister_handler()
164 hal_info *info = (hal_info *)handle; in wifi_unregister_vendor_handler() local
166 pthread_mutex_lock(&info->cb_lock); in wifi_unregister_vendor_handler()
168 for (int i = 0; i < info->num_event_cb; i++) { in wifi_unregister_vendor_handler()
170 if (info->event_cb[i].nl_cmd == NL80211_CMD_VENDOR in wifi_unregister_vendor_handler()
171 && info->event_cb[i].vendor_id == id in wifi_unregister_vendor_handler()
172 && info->event_cb[i].vendor_subcmd == subcmd) { in wifi_unregister_vendor_handler()
173 if(i < info->num_event_cb-1) { in wifi_unregister_vendor_handler()
177 memmove(&info->event_cb[i], &info->event_cb[i+1], in wifi_unregister_vendor_handler()
178 (info->num_event_cb - i) * sizeof(cb_info)); in wifi_unregister_vendor_handler()
180 info->num_event_cb--; in wifi_unregister_vendor_handler()
186 pthread_mutex_unlock(&info->cb_lock); in wifi_unregister_vendor_handler()