Re: [PATCH] Bluetooth: Trivial refactoring in __l2cap_chan_add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrei,

On Fri, Jun 1, 2012 at 4:06 AM, Andrei Emeltchenko
<andrei.emeltchenko.news@xxxxxxxxx> wrote:
> Hi Andre,
>
> On Thu, May 31, 2012 at 08:59:54PM -0300, Andre Guedes wrote:
>> All cases in switch statement set chan->omtu to L2CAP_DEFAULT_MTU.
>> This patch moves the assignments to outside the switch statement.
>>
>> Signed-off-by: Andre Guedes <andre.guedes@xxxxxxxxxxxxx>
>> ---
>>  net/bluetooth/l2cap_core.c |    5 +----
>>  1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
>> index f9bffe3..0ba8875 100644
>> --- a/net/bluetooth/l2cap_core.c
>> +++ b/net/bluetooth/l2cap_core.c
>> @@ -449,13 +449,11 @@ static void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
>>       case L2CAP_CHAN_CONN_ORIENTED:
>>               if (conn->hcon->type == LE_LINK) {
>>                       /* LE connection */
>> -                     chan->omtu = L2CAP_DEFAULT_MTU;
>>                       chan->scid = L2CAP_CID_LE_DATA;
>>                       chan->dcid = L2CAP_CID_LE_DATA;
>>               } else {
>>                       /* Alloc CID for connection-oriented socket */
>>                       chan->scid = l2cap_alloc_cid(conn);
>> -                     chan->omtu = L2CAP_DEFAULT_MTU;
>>               }
>>               break;
>>
>> @@ -463,7 +461,6 @@ static void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
>>               /* Connectionless socket */
>>               chan->scid = L2CAP_CID_CONN_LESS;
>>               chan->dcid = L2CAP_CID_CONN_LESS;
>> -             chan->omtu = L2CAP_DEFAULT_MTU;
>>               break;
>>
>>       case L2CAP_CHAN_CONN_FIX_A2MP:
>
> what about omtu for fixed channel?

You're right. This patch doesn't make sense anymore. We recently added
the case L2CAP_CHAN_CONN_FIX_A2MP, this patch was written before that.

Thanks,

Andre
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux