Skip to content
Commit df4220b2 authored by Johan Hedberg's avatar Johan Hedberg Committed by Johan Hedberg
Browse files

Bluetooth: L2CAP: Add support for dynamically allocated PSM values



The Bluetooth core specification splits the valid LE L2CAP PSM range
into two subranges:

 - Standard, SIG-assigned fixed PSM values in the range 0x0001-0x007f
 - Dynamic, allocated at runtime in the range 0x0080-0x00ff

Previously the bt_l2cap_server_register() API was assuming that the
app would always decide the PSM, which effectively made it impossible
to have collision-free dynamic PSMs. This patch extends the
implementation so that if server->psm is 0, then the stack will look
for a free PSM from the dynamic range and take it into use.

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 20ea1b86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment