+ BT_ACL_DEBUG(2, "-- Options Len: 0x%04X", OptionsLen);\r
+\r
+ /* Only look at the channel configuration options if a valid channel entry for the local channel number was found */\r
+ if (ChannelData != NULL)\r
+ {\r
+ /* Iterate through each option in the configuration request to look for ones which can be processed */\r
+ uint8_t OptionPos = 0;\r
+ while (OptionPos < OptionsLen)\r
+ {\r
+ BT_Config_Option_Header_t* OptionHeader = (BT_Config_Option_Header_t*)&Options[OptionPos];\r
+ void* OptionData = &Options[OptionPos + sizeof(*OptionHeader)];\r
+\r
+ BT_ACL_DEBUG(2, "-- Option Type: 0x%04X", OptionHeader->Type);\r
+ BT_ACL_DEBUG(2, "-- Option Length: 0x%04X", (sizeof(*OptionHeader) + OptionHeader->Length));\r
+ \r
+ /* Store the remote MTU option's value if present */\r
+ if (OptionHeader->Type == BT_CONFIG_OPTION_MTU)\r
+ ChannelData->RemoteMTU = *((uint16_t*)OptionData);\r
+\r
+ /* Progress to the next option in the packet */\r
+ OptionPos += (sizeof(*OptionHeader) + OptionHeader->Length);\r
+ }\r
+ }\r