@@ -486,18 +486,25 @@ static void gip_auth_exchange_rsa(struct work_struct *work)
486486 __func__ , err );
487487}
488488
489+ int gip_auth_send_complete (struct gip_client * client )
490+ {
491+ struct gip_auth_header_control hdr = {};
492+
493+ hdr .context = GIP_AUTH_CTX_CONTROL ;
494+ hdr .control = GIP_AUTH_CTRL_COMPLETE ;
495+
496+ return gip_send_authenticate (client , & hdr , sizeof (hdr ), false);
497+ }
498+ EXPORT_SYMBOL_GPL (gip_auth_send_complete );
499+
489500static void gip_auth_complete_handshake (struct work_struct * work )
490501{
491502 struct gip_auth * auth = container_of (work , typeof (* auth ),
492503 work_complete );
493- struct gip_auth_header_control hdr = {};
494504 u8 random [GIP_AUTH_RANDOM_LEN * 2 ];
495505 u8 key [GIP_AUTH_SESSION_KEY_LEN ];
496506 int err ;
497507
498- hdr .context = GIP_AUTH_CTX_CONTROL ;
499- hdr .control = GIP_AUTH_CTRL_COMPLETE ;
500-
501508 memcpy (random , auth -> random_host , sizeof (auth -> random_host ));
502509 memcpy (random + sizeof (auth -> random_host ), auth -> random_client ,
503510 sizeof (auth -> random_client ));
@@ -517,9 +524,9 @@ static void gip_auth_complete_handshake(struct work_struct *work)
517524 dev_dbg (& auth -> client -> dev , "%s: key=%*phD\n" , __func__ ,
518525 (int )sizeof (key ), key );
519526
520- err = gip_send_authenticate (auth -> client , & hdr , sizeof ( hdr ), false );
527+ err = gip_auth_send_complete (auth -> client );
521528 if (err ) {
522- dev_err (& auth -> client -> dev , "%s: send pkt failed: %d\n" ,
529+ dev_err (& auth -> client -> dev , "%s: send complete failed: %d\n" ,
523530 __func__ , err );
524531 return ;
525532 }
0 commit comments