Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6a0915f authored by Samuel Ortiz's avatar Samuel Ortiz
Browse files

NFC: Avoid falling back to SYMM when sk is NULL



In some cases (SNL, DISC, DM) we need to send an LLCP skbs without
having a sock owning it. I frames are an exception here since
they may be requeued to the llcp_sock queue.

Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 97f18414
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -610,7 +610,10 @@ static void nfc_llcp_tx_work(struct work_struct *work)
	if (skb != NULL) {
	if (skb != NULL) {
		sk = skb->sk;
		sk = skb->sk;
		llcp_sock = nfc_llcp_sock(sk);
		llcp_sock = nfc_llcp_sock(sk);
		if (llcp_sock != NULL) {

		if (llcp_sock == NULL && nfc_llcp_ptype(skb) == LLCP_PDU_I) {
			nfc_llcp_send_symm(local->dev);
		} else {
			int ret;
			int ret;


			pr_debug("Sending pending skb\n");
			pr_debug("Sending pending skb\n");
@@ -629,8 +632,6 @@ static void nfc_llcp_tx_work(struct work_struct *work)
				skb_queue_tail(&llcp_sock->tx_pending_queue,
				skb_queue_tail(&llcp_sock->tx_pending_queue,
					       skb);
					       skb);
			}
			}
		} else {
			nfc_llcp_send_symm(local->dev);
		}
		}
	} else {
	} else {
		nfc_llcp_send_symm(local->dev);
		nfc_llcp_send_symm(local->dev);