Bluetooth: Centralize disallowing SMP commands to a single place
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 11 Sep 2014 00:37:43 +0000 (17:37 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 11 Sep 2014 00:45:24 +0000 (02:45 +0200)
commit24bd0bd94e0947e257c5cd6a85b0e337d953e79c
tree9cbdb05d7dd446f4355f3c8cd4c7ae1b6a833ab4
parentc05b9339c8a448a2df0c8598424ea9c0933288d1
Bluetooth: Centralize disallowing SMP commands to a single place

All the cases where we mark SMP commands as dissalowed are their
respective command handlers. We can therefore simplify the code by
always clearing the bit immediately after testing it. This patch
converts the corresponding test_bit() call to a test_and_clear_bit()
call and also removes the now unused SMP_DISALLOW_CMD macro.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/smp.c