Lines Matching refs:dhd_nli
64 int dhd_nl_sock_connect(struct dhd_netlink_info *dhd_nli) in dhd_nl_sock_connect() argument
66 dhd_nli->nl = nl_socket_alloc(); in dhd_nl_sock_connect()
67 if (dhd_nli->nl == NULL) in dhd_nl_sock_connect()
70 if (genl_connect(dhd_nli->nl) < 0) { in dhd_nl_sock_connect()
75 dhd_nli->nl_id = genl_ctrl_resolve(dhd_nli->nl, "nl80211"); in dhd_nl_sock_connect()
76 if (dhd_nli->nl_id < 0) { in dhd_nl_sock_connect()
81 dhd_nli->cb = nl_cb_alloc(NL_CB_DEBUG); in dhd_nl_sock_connect()
82 if (dhd_nli->cb == NULL) in dhd_nl_sock_connect()
85 nl_socket_set_cb(dhd_nli->nl, dhd_nli->cb); in dhd_nl_sock_connect()
89 nl_cb_put(dhd_nli->cb); in dhd_nl_sock_connect()
90 nl_socket_free(dhd_nli->nl); in dhd_nl_sock_connect()
95 void dhd_nl_sock_disconnect(struct dhd_netlink_info *dhd_nli) in dhd_nl_sock_disconnect() argument
97 nl_cb_put(dhd_nli->cb); in dhd_nl_sock_disconnect()
98 nl_socket_free(dhd_nli->nl); in dhd_nl_sock_disconnect()
101 int dhd_nl_do_testmode(struct dhd_netlink_info *dhd_nli, dhd_ioctl_t *ioc) in dhd_nl_do_testmode() argument
111 genlmsg_put(msg, 0, 0, dhd_nli->nl_id, 0, 0, in dhd_nl_do_testmode()
113 NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, dhd_nli->ifidx); in dhd_nl_do_testmode()
116 err = nl_send_auto_complete(dhd_nli->nl, msg); in dhd_nl_do_testmode()
121 nl_cb_err(dhd_nli->cb, NL_CB_CUSTOM, dhd_nl_error_handler, &err); in dhd_nl_do_testmode()
122 nl_cb_set(dhd_nli->cb, NL_CB_ACK, NL_CB_CUSTOM, in dhd_nl_do_testmode()
124 nl_cb_set(dhd_nli->cb, NL_CB_FINISH, NL_CB_CUSTOM, in dhd_nl_do_testmode()
126 nl_cb_set(dhd_nli->cb, NL_CB_VALID, NL_CB_CUSTOM, in dhd_nl_do_testmode()
129 nl_recvmsgs(dhd_nli->nl, dhd_nli->cb); in dhd_nl_do_testmode()