Bluetooth: Simplify setting Configuration Field
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Thu, 26 Nov 2015 14:49:34 +0000 (16:49 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 9 Dec 2015 23:51:49 +0000 (00:51 +0100)
Only Sliding Window Size is used at the moment for H5 Bluetooth
Configuration messages.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_h5.c

index fc1a499bca95a53da683cf59f6004e243f53708f..2d1c9f6a912c63a5449038dd8988af0515c383fc 100644 (file)
@@ -116,12 +116,8 @@ static void h5_link_control(struct hci_uart *hu, const void *data, size_t len)
 
 static u8 h5_cfg_field(struct h5 *h5)
 {
-       u8 field = 0;
-
        /* Sliding window size (first 3 bits) */
-       field |= (h5->tx_win & 0x07);
-
-       return field;
+       return h5->tx_win & 0x07;
 }
 
 static void h5_timed_event(unsigned long arg)