mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
netdev: constify struct scan_bss use
netdev does not keep any pointers to struct scan_bss arguments that are passed in. Make this explicitly clear by modifying the API definitions and mark these as const.
This commit is contained in:
parent
950624761c
commit
f56d01d25e
14
src/netdev.c
14
src/netdev.c
@ -3977,8 +3977,8 @@ offload_1x:
|
||||
}
|
||||
|
||||
static void netdev_connect_common(struct netdev *netdev,
|
||||
struct scan_bss *bss,
|
||||
struct scan_bss *prev_bss,
|
||||
const struct scan_bss *bss,
|
||||
const struct scan_bss *prev_bss,
|
||||
struct handshake_state *hs,
|
||||
const struct iovec *vendor_ies,
|
||||
size_t num_vendor_ies,
|
||||
@ -4071,7 +4071,7 @@ build_cmd_connect:
|
||||
WIPHY_WORK_PRIORITY_CONNECT, &connect_work_ops);
|
||||
}
|
||||
|
||||
int netdev_connect(struct netdev *netdev, struct scan_bss *bss,
|
||||
int netdev_connect(struct netdev *netdev, const struct scan_bss *bss,
|
||||
struct handshake_state *hs,
|
||||
const struct iovec *vendor_ies,
|
||||
size_t num_vendor_ies,
|
||||
@ -4178,8 +4178,9 @@ int netdev_disconnect(struct netdev *netdev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int netdev_reassociate(struct netdev *netdev, struct scan_bss *target_bss,
|
||||
struct scan_bss *orig_bss, struct handshake_state *hs,
|
||||
int netdev_reassociate(struct netdev *netdev, const struct scan_bss *target_bss,
|
||||
const struct scan_bss *orig_bss,
|
||||
struct handshake_state *hs,
|
||||
netdev_event_func_t event_filter,
|
||||
netdev_connect_cb_t cb, void *user_data)
|
||||
{
|
||||
@ -4796,7 +4797,8 @@ static void netdev_preauth_cb(const uint8_t *pmk, void *user_data)
|
||||
pmk, preauth->user_data);
|
||||
}
|
||||
|
||||
int netdev_preauthenticate(struct netdev *netdev, struct scan_bss *target_bss,
|
||||
int netdev_preauthenticate(struct netdev *netdev,
|
||||
const struct scan_bss *target_bss,
|
||||
netdev_preauthenticate_cb_t cb, void *user_data)
|
||||
{
|
||||
struct netdev_preauth_state *preauth;
|
||||
|
11
src/netdev.h
11
src/netdev.h
@ -151,7 +151,7 @@ uint8_t netdev_get_rssi_level_idx(struct netdev *netdev);
|
||||
struct handshake_state *netdev_handshake_state_new(struct netdev *netdev);
|
||||
struct handshake_state *netdev_get_handshake(struct netdev *netdev);
|
||||
|
||||
int netdev_connect(struct netdev *netdev, struct scan_bss *bss,
|
||||
int netdev_connect(struct netdev *netdev, const struct scan_bss *bss,
|
||||
struct handshake_state *hs,
|
||||
const struct iovec *vendor_ies,
|
||||
size_t num_vendor_ies,
|
||||
@ -159,8 +159,10 @@ int netdev_connect(struct netdev *netdev, struct scan_bss *bss,
|
||||
netdev_connect_cb_t cb, void *user_data);
|
||||
int netdev_disconnect(struct netdev *netdev,
|
||||
netdev_disconnect_cb_t cb, void *user_data);
|
||||
int netdev_reassociate(struct netdev *netdev, struct scan_bss *target_bss,
|
||||
struct scan_bss *orig_bss, struct handshake_state *hs,
|
||||
int netdev_reassociate(struct netdev *netdev,
|
||||
const struct scan_bss *target_bss,
|
||||
const struct scan_bss *orig_bss,
|
||||
struct handshake_state *hs,
|
||||
netdev_event_func_t event_filter,
|
||||
netdev_connect_cb_t cb, void *user_data);
|
||||
int netdev_fast_transition(struct netdev *netdev,
|
||||
@ -173,7 +175,8 @@ int netdev_fast_transition_over_ds(struct netdev *netdev,
|
||||
const struct scan_bss *target_bss,
|
||||
const struct scan_bss *orig_bss,
|
||||
netdev_connect_cb_t cb);
|
||||
int netdev_preauthenticate(struct netdev *netdev, struct scan_bss *target_bss,
|
||||
int netdev_preauthenticate(struct netdev *netdev,
|
||||
const struct scan_bss *target_bss,
|
||||
netdev_preauthenticate_cb_t cb,
|
||||
void *user_data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user