From patchwork Mon Apr 3 14:48:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 9659683 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E0AF36032D for ; Mon, 3 Apr 2017 14:49:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4AFA283BA for ; Mon, 3 Apr 2017 14:49:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C940D283F1; Mon, 3 Apr 2017 14:49:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75088283BA for ; Mon, 3 Apr 2017 14:49:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751431AbdDCOtH (ORCPT ); Mon, 3 Apr 2017 10:49:07 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:32888 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752579AbdDCOtG (ORCPT ); Mon, 3 Apr 2017 10:49:06 -0400 Received: by mail-lf0-f65.google.com with SMTP id r36so13131914lfi.0; Mon, 03 Apr 2017 07:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mhUYgSizPUk3WgLaEZyVkBY92BbxQtX/RUA3rkWxAtI=; b=I/ZqBBMmkKy1aA9NJ6wnYZAu8Cu4LWbb7x1kWL9jtFmQJXiBVlIWnxsxR+WT8kvxVO idakCnj2b6F/h183aB4SWnX68+6rVAINFOZBv0f2F7ztSc5mWzBJiqjozJbmA/OGFAXq F8J8DW47DQ8pvWSIarChXP6X9rAyp1ePoM0JpNh+vwPzfmVnUB1EsNerWz1r3/HQgIJ5 3WNOqiKJMN42poJd97p/UDNJ9pczg9SGCqLd7doP9Wkfx6O2iOSNCA6EhlCHVoe4u1oU gDjfuQpcHftnR+qfFErWhnpnZ3o2TR2I/1pMBxlAILqfV1ZXwwuMrsZy50iOQJbIPnJg 3iFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mhUYgSizPUk3WgLaEZyVkBY92BbxQtX/RUA3rkWxAtI=; b=Ie2bNJjmWbKnM505HIdBqxj4HZLTZLgjLCItUeZI0mXgA1NNMUWZF03doMEx4qat2p 7Rhk0rEdOQpja6xrBOhsFZPJWuj6m3tB18u/vjqG/7ewi0jaaimbAbkeNjoAA6Wn2CXW rE9fDoOq2LF1zomxUT4OAKqQH9vAHBlEaGdEVgWyVdXG86889d5GjKbIpXgp/PbVK7G4 qrShpKE0lIhcQWOl98+h84bsyfK/wUTDO58UyazXtxaN9qD8SweE5o4F20ixks8TBARB MfZ5+P5iWhcaW95HO1VtDhzng9lki69/X9kV2zjD4uoDUJclRDKftsQ+aoGod6XQt1Mt 9wvw== X-Gm-Message-State: AFeK/H3589KicwRVOZa4gTW+h8b8yRA0n3kVJApoid06JEqR+KFlzx/+Vlf7ZD0BDer3ew== X-Received: by 10.46.87.67 with SMTP id r3mr5073666ljd.73.1491230944049; Mon, 03 Apr 2017 07:49:04 -0700 (PDT) Received: from localhost.localdomain (85-76-97-254-nat.elisa-mobile.fi. [85.76.97.254]) by smtp.gmail.com with ESMTPSA id e88sm2628995lji.26.2017.04.03.07.49.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 07:49:03 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Cc: aar@pengutronix.de, jukka.rissanen@linux.intel.com, linux-wpan@vger.kernel.org Subject: [PATCH 3/3] Bluetooth: L2CAP: Don't return -EAGAIN if out of credits Date: Mon, 3 Apr 2017 17:48:57 +0300 Message-Id: <20170403144857.4661-3-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170403144857.4661-1-luiz.dentz@gmail.com> References: <20170403144857.4661-1-luiz.dentz@gmail.com> Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Luiz Augusto von Dentz Just keep queueing them into TX queue since the caller might just have to do the same and there is no impact in adding another packet to the TX queue even if there aren't any credits to transmit them. Signed-off-by: Luiz Augusto von Dentz Acked-by: Jukka Rissanen --- net/bluetooth/l2cap_core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index fc7f321..3a202b0 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -2458,9 +2458,6 @@ int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len) if (len > chan->omtu) return -EMSGSIZE; - if (!chan->tx_credits) - return -EAGAIN; - __skb_queue_head_init(&seg_queue); err = l2cap_segment_le_sdu(chan, &seg_queue, msg, len);