Bluetooth: SMP: Set allowed commands before sending the SMP packet
Bluetooth: SMP: Set allowed commands before sending the SMP packet

Set the allowed command bitmask before sending the SMP packet. This
avoids a race-condition in case the sending of the PDU made the
current thread not ready and would not be scheduled back in time
to set the bit before receiving the next SMP packet.

Signed-off-by: Joakim Andersson <cf0fcab5d38d6e132e92a97bcb0bae257abf4936@nordicsemi.no>

zephyrproject-rtos/zephyr,galak/zephyr,nashif/zephyr,Vudentz/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr,galak/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,finikorg/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,nashif/zephyr,finikorg/zephyr,nashif/zephyr