|
@@ -2915,12 +2915,14 @@ static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len)
|
|
while (len >= L2CAP_CONF_OPT_SIZE) {
|
|
while (len >= L2CAP_CONF_OPT_SIZE) {
|
|
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
|
|
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
|
|
|
|
|
|
- switch (type) {
|
|
|
|
- case L2CAP_CONF_RFC:
|
|
|
|
- if (olen == sizeof(rfc))
|
|
|
|
- memcpy(&rfc, (void *)val, olen);
|
|
|
|
- goto done;
|
|
|
|
- }
|
|
|
|
|
|
+ if (type != L2CAP_CONF_RFC)
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
+ if (olen != sizeof(rfc))
|
|
|
|
+ break;
|
|
|
|
+
|
|
|
|
+ memcpy(&rfc, (void *)val, olen);
|
|
|
|
+ goto done;
|
|
}
|
|
}
|
|
|
|
|
|
/* Use sane default values in case a misbehaving remote device
|
|
/* Use sane default values in case a misbehaving remote device
|