Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=861d6882b3dfe1710b35dbddf1b395b962061413
Commit:     861d6882b3dfe1710b35dbddf1b395b962061413
Parent:     876d9484edf77d228adb42aecd4debd58d7739d6
Author:     Marcel Holtmann <[EMAIL PROTECTED]>
AuthorDate: Sat Oct 20 13:37:06 2007 +0200
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Oct 22 02:59:41 2007 -0700

    [Bluetooth] Remove global conf_mtu variable from L2CAP
    
    After the change to the L2CAP configuration parameter handling the
    global conf_mtu variable is no longer needed and so remove it.
    
    Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]>
---
 include/net/bluetooth/l2cap.h |   10 +++++-----
 net/bluetooth/l2cap.c         |   12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 70e70f5..f7bcd1f 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -221,7 +221,6 @@ struct l2cap_pinfo {
        __u8            conf_len;
        __u8            conf_state;
        __u8            conf_retry;
-       __u16           conf_mtu;
 
        __u8            ident;
 
@@ -232,10 +231,11 @@ struct l2cap_pinfo {
        struct sock             *prev_c;
 };
 
-#define L2CAP_CONF_REQ_SENT    0x01
-#define L2CAP_CONF_INPUT_DONE  0x02
-#define L2CAP_CONF_OUTPUT_DONE 0x04
-#define L2CAP_CONF_MAX_RETRIES 2
+#define L2CAP_CONF_REQ_SENT    0x01
+#define L2CAP_CONF_INPUT_DONE  0x02
+#define L2CAP_CONF_OUTPUT_DONE 0x04
+
+#define L2CAP_CONF_MAX_RETRIES 2
 
 void l2cap_load(void);
 
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 6ce693d..fde1606 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -508,7 +508,6 @@ static void l2cap_sock_init(struct sock *sk, struct sock 
*parent)
 
        /* Default config options */
        pi->conf_len = 0;
-       pi->conf_mtu = L2CAP_DEFAULT_MTU;
        pi->flush_to = L2CAP_DEFAULT_FLUSH_TO;
 }
 
@@ -1256,11 +1255,11 @@ static inline int l2cap_get_conf_opt(void **ptr, int 
*type, int *olen, unsigned
                break;
 
        case 2:
-               *val = __le16_to_cpu(*((__le16 *)opt->val));
+               *val = __le16_to_cpu(*((__le16 *) opt->val));
                break;
 
        case 4:
-               *val = __le32_to_cpu(*((__le32 *)opt->val));
+               *val = __le32_to_cpu(*((__le32 *) opt->val));
                break;
 
        default:
@@ -1332,6 +1331,7 @@ static int l2cap_parse_conf_req(struct sock *sk, void 
*data)
        int len = pi->conf_len;
        int type, hint, olen;
        unsigned long val;
+       u16 mtu = L2CAP_DEFAULT_MTU;
        u16 result = L2CAP_CONF_SUCCESS;
 
        BT_DBG("sk %p", sk);
@@ -1344,7 +1344,7 @@ static int l2cap_parse_conf_req(struct sock *sk, void 
*data)
 
                switch (type) {
                case L2CAP_CONF_MTU:
-                       pi->conf_mtu = val;
+                       mtu = val;
                        break;
 
                case L2CAP_CONF_FLUSH_TO:
@@ -1368,10 +1368,10 @@ static int l2cap_parse_conf_req(struct sock *sk, void 
*data)
                /* Configure output options and let the other side know
                 * which ones we don't like. */
 
-               if (pi->conf_mtu < pi->omtu)
+               if (mtu < pi->omtu)
                        result = L2CAP_CONF_UNACCEPT;
                else {
-                       pi->omtu = pi->conf_mtu;
+                       pi->omtu = mtu;
                        pi->conf_state |= L2CAP_CONF_OUTPUT_DONE;
                }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to