From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95409C001E0 for ; Thu, 10 Aug 2023 19:13:32 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1qUB41-000218-0s; Thu, 10 Aug 2023 15:11:17 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1qUB3z-00020t-0n for kernelnewbies@kernelnewbies.org; Thu, 10 Aug 2023 15:11:15 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1bdb08e9057so3951665ad.0 for ; Thu, 10 Aug 2023 12:11:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691694657; x=1692299457; h=in-reply-to:cc:content-language:references:to:from:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=RVaWo+S+lCqX4b/yF5TD1tOng8owOXGZV2ehX9lqu2o=; b=D6WHPZZ9n8ni4tMG3w9s7SIzc9XGNFuLOuBIff/RaQmHWcYjRrxyFJaKXrJ2Ey/bm5 +I2owgnrGsrjRy/8AvwqgWp/tIxxnuuAJrheUGPodActuzFs4MNBil78EpgPFmnwjX5O 9AalkTokCwPLigi1hF652sibIGELKa5J1QAu5y6UPrcfHtdFbaog6oyd2OoiibDvI3Xo Nm5LVazxgYGqOTEF7c3r79GPg7rthRY7HIhxLpE2uRzsveoQMATqJfFkAbmtEQ4KXJmE GSlNCOQ5NzQlQK1uhW63IrxgSnwFeyaQpTzISIcINBhyKEagJXsT5pP5aT/uDGq+pijf sPSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691694657; x=1692299457; h=in-reply-to:cc:content-language:references:to:from:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RVaWo+S+lCqX4b/yF5TD1tOng8owOXGZV2ehX9lqu2o=; b=KFxG/0J4aj97ioXKUa2XwGMuI6O+h7lAny4lRejArfz8Xq03ijDLwnkFYwu8Pq3DwK tKtTG10QpqKkmE4qWiPC/IpFLzF/HYUjPGZ59/rbah3R0C+RlbJbUH+DTU9vR8+Ow3M9 4nukWd6+3pEk2FwYH8jry2hsqzQSRkNKeixj0DeKbjKIDgtoZtnUpfUHOz7D5jiWxXKC LfM+fPr4cLU/S87fJC6KAE1yZJIjcPdUj65BVApuOlEcxjjlsDQS7ZHNdcewUTcYgp84 XUhyEtoKc7/I5A66dJtEyL4rmX2WfBt+unLL2cJ0hhzJR6zQ4JaEGwgLaD6U944lVP9z Kv4A== X-Gm-Message-State: AOJu0YxWMTe2vhWiC1XEvRVsjG/Xt99YENV2rkqqA2AXkHyVwmfFlyye U9DwQuUxgdliq8YA0zVGVkzYTmxOF4dpLQ== X-Google-Smtp-Source: AGHT+IEnqL+d9fqrL04zlU85uNmydpDKfOf8sCeAiEKL442C854riY7BNSju4OaNqk3sL2HRch1biQ== X-Received: by 2002:a17:903:228d:b0:1bc:6e5f:392f with SMTP id b13-20020a170903228d00b001bc6e5f392fmr4116067plh.48.1691694657238; Thu, 10 Aug 2023 12:10:57 -0700 (PDT) Received: from ?IPV6:2401:4900:3b36:e855:f2e7:7fb8:b55b:69ab? ([2401:4900:3b36:e855:f2e7:7fb8:b55b:69ab]) by smtp.gmail.com with ESMTPSA id y15-20020a637d0f000000b00553d42a7cb5sm1868705pgc.68.2023.08.10.12.10.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Aug 2023 12:10:56 -0700 (PDT) Message-ID: <3e150f46-d3c8-ea5b-0f84-33cdab963dbf@gmail.com> Date: Fri, 11 Aug 2023 00:40:50 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: Using net/wan/hdlc with serdev From: Ayush Singh To: kernelnewbies@kernelnewbies.org References: <776435cc-1314-22c7-4ff9-88078496b11a@gmail.com> Content-Language: en-US In-Reply-To: <776435cc-1314-22c7-4ff9-88078496b11a@gmail.com> Cc: khc@pm.waw.pl X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============3643957408944546606==" Errors-To: kernelnewbies-bounces@kernelnewbies.org This is a multi-part message in MIME format. --===============3643957408944546606== Content-Type: multipart/alternative; boundary="------------tiQ8q05ABZHXZGqoigt0laR2" Content-Language: en-US This is a multi-part message in MIME format. --------------tiQ8q05ABZHXZGqoigt0laR2 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit So after some more looking around in the code, I think the workflow is quite a bit different than what I thought in the previous mail. I think I am supposed to allocate hdlc device using `alloc_hdlcdev` in the `serdev->probe` and then implementing `hdlc->xmit` to send data over UART. But well, I am not sure how to create an HDLC frame? Is there a helper that creates HDLC frame skbuff for me? Or maybe the hdlc implementation is simply not designed to be used for Asynchronous framing [1]. It would be great if someone could explain how to use this HDLC module or point to some resource I might have missed. Ayush Singh [1]: https://en.wikipedia.org/wiki/High-Level_Data_Link_Control#Asynchronous_framing --------------tiQ8q05ABZHXZGqoigt0laR2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

So after some more looking around in the code, I think the workflow is quite a bit different than what I thought in the previous mail. I think I am supposed to allocate hdlc device using `alloc_hdlcdev` in the `serdev->probe` and then implementing `hdlc->xmit` to send data over UART.

But well, I am not sure how to create an HDLC frame? Is there a helper that creates HDLC frame skbuff for me? Or maybe the hdlc implementation is simply not designed to be used for Asynchronous framing [1]. It would be great if someone could explain how to use this HDLC module or point to some resource I might have missed.


Ayush Singh


[1]: https://en.wikipedia.org/wiki/High-Level_Data_Link_Control#Asynchronous_framing

--------------tiQ8q05ABZHXZGqoigt0laR2-- --===============3643957408944546606== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============3643957408944546606==--