Socket-less PSP associations will need to install a Tx key the same way sockets do. Make psp_assoc_set_tx() non-static, and declare it in net/psp/psp.h. Signed-off-by: Todd Freed --- net/psp/psp.h | 3 +++ net/psp/psp_sock.c | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/net/psp/psp.h b/net/psp/psp.h index 0cfc82c6c711..687bedde5ea9 100644 --- a/net/psp/psp.h +++ b/net/psp/psp.h @@ -29,6 +29,9 @@ void psp_nl_notify_disassoc(struct psp_dev *psd, struct net *net); struct psp_assoc *psp_assoc_create(struct psp_dev *psd); struct psp_dev *psp_dev_get_for_sock(struct sock *sk); void psp_dev_tx_key_del(struct psp_dev *psd, struct psp_assoc *pas); +int psp_assoc_set_tx(struct psp_dev *psd, struct psp_assoc *pas, + struct psp_key_parsed *key, + struct netlink_ext_ack *extack); int psp_sock_assoc_set_rx(struct sock *sk, struct psp_assoc *pas, struct psp_key_parsed *key, struct netlink_ext_ack *extack); diff --git a/net/psp/psp_sock.c b/net/psp/psp_sock.c index cba1b85336ff..89d97e5ff37c 100644 --- a/net/psp/psp_sock.c +++ b/net/psp/psp_sock.c @@ -231,9 +231,18 @@ int psp_sock_assoc_set_rx(struct sock *sk, struct psp_assoc *pas, return err; } -static int psp_assoc_set_tx(struct psp_dev *psd, struct psp_assoc *pas, - struct psp_key_parsed *key, - struct netlink_ext_ack *extack) +/** + * psp_assoc_set_tx() - install a Tx key for an association + * @psd: PSP device, must be locked + * @pas: association, must belong to @psd and not have a Tx key yet + * @key: Tx SPI and key + * @extack: netlink extended ack + * + * Return: 0 on success, negative errno otherwise. + */ +int psp_assoc_set_tx(struct psp_dev *psd, struct psp_assoc *pas, + struct psp_key_parsed *key, + struct netlink_ext_ack *extack) { int err; -- 2.53.1-Meta