Bluetooth: Storing Link key persistantly based on the Auth Req.

Store the link key persistently if one of the following is true:
 1. this is a legacy link key
 2. this is a changed combination key and there was a previously
    stored one
 3. neither local nor remote side had no-bonding as a requirement
 4. the local side had dedicated bonding as a requirement
 5. the remote side is using dedicated bonding since in that case
    also the local requirements are set to dedicated bonding
 If none of the above match only keep the link key around for
 this connection and set the temporary flag for the device.

CRs-Fixed: 309161
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
2 files changed