nl80211: Use socket cb instead of global->nl_cb in send_and_recv()
This is a step towards cleaning up all the workarounds that have showed up over the years and made the design difficult to understand. This removes use of the separate registration of process_bss_event() as NL_CB_VALID for the individual commands since the use of the appropriate cb (i.e., the one from nl80211_init_bss() in these cases) will already point to the correct handler. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
84fdc8cd8b
commit
da0d51fee7
1 changed files with 3 additions and 3 deletions
|
@ -505,7 +505,7 @@ static int send_and_recv(struct nl80211_global *global,
|
||||||
|
|
||||||
err.err = -ENOMEM;
|
err.err = -ENOMEM;
|
||||||
|
|
||||||
cb = nl_cb_clone(global->nl_cb);
|
cb = nl_cb_clone(nl_socket_get_cb(nl_handle));
|
||||||
if (!cb)
|
if (!cb)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
@ -649,7 +649,7 @@ send_and_recv_msgs_connect_handle(struct wpa_driver_nl80211_data *drv,
|
||||||
|
|
||||||
if (nl_connect)
|
if (nl_connect)
|
||||||
return send_and_recv_msgs_owner(drv, msg, nl_connect, set_owner,
|
return send_and_recv_msgs_owner(drv, msg, nl_connect, set_owner,
|
||||||
process_bss_event, bss, NULL,
|
NULL, NULL, NULL,
|
||||||
NULL, err_info);
|
NULL, err_info);
|
||||||
else
|
else
|
||||||
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL,
|
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL,
|
||||||
|
@ -3814,7 +3814,7 @@ int wpa_driver_nl80211_mlme(struct wpa_driver_nl80211_data *drv,
|
||||||
|
|
||||||
if (nl_connect)
|
if (nl_connect)
|
||||||
ret = send_and_recv(drv->global, nl_connect, msg,
|
ret = send_and_recv(drv->global, nl_connect, msg,
|
||||||
process_bss_event, bss, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL, NULL);
|
||||||
else
|
else
|
||||||
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL,
|
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
Loading…
Reference in a new issue