Merge branch 'bugzilla-14700' into release
[pandora-kernel.git] / net / bluetooth / bnep / core.c
index cafe9f5..ef09c7b 100644 (file)
@@ -78,7 +78,7 @@ static struct bnep_session *__bnep_get_session(u8 *dst)
 static void __bnep_link_session(struct bnep_session *s)
 {
        /* It's safe to call __module_get() here because sessions are added
-          by the socket layer which has to hold the refference to this module.
+          by the socket layer which has to hold the reference to this module.
         */
        __module_get(THIS_MODULE);
        list_add(&s->list, &bnep_session_list);
@@ -230,7 +230,6 @@ static int bnep_rx_control(struct bnep_session *s, void *data, int len)
 
        switch (cmd) {
        case BNEP_CMD_NOT_UNDERSTOOD:
-       case BNEP_SETUP_CONN_REQ:
        case BNEP_SETUP_CONN_RSP:
        case BNEP_FILTER_NET_TYPE_RSP:
        case BNEP_FILTER_MULTI_ADDR_RSP:
@@ -245,6 +244,10 @@ static int bnep_rx_control(struct bnep_session *s, void *data, int len)
                err = bnep_ctrl_set_mcfilter(s, data, len);
                break;
 
+       case BNEP_SETUP_CONN_REQ:
+               err = bnep_send_rsp(s, BNEP_SETUP_CONN_RSP, BNEP_CONN_NOT_ALLOWED);
+               break;
+
        default: {
                        u8 pkt[3];
                        pkt[0] = BNEP_CONTROL;
@@ -629,7 +632,7 @@ int bnep_del_connection(struct bnep_conndel_req *req)
        s = __bnep_get_session(req->dst);
        if (s) {
                /* Wakeup user-space which is polling for socket errors.
-                * This is temporary hack untill we have shutdown in L2CAP */
+                * This is temporary hack until we have shutdown in L2CAP */
                s->sock->sk->sk_err = EUNATCH;
 
                /* Kill session thread */