Re: [PATCH net-next v3 04/12] net: wwan: t7xx: Add control port

From
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Date
2021-12-16 13:44:46
Also in
linux-wireless
Reply to
Ricardo Martinez, 2021-12-07
On Mon, 6 Dec 2021, Ricardo Martinez wrote:
From: Haijun Liu <haijun.liu@mediatek.com>

Control Port implements driver control messages such as modem-host
handshaking, controls port enumeration, and handles exception messages.

The handshaking process between the driver and the modem happens during
the init sequence. The process involves the exchange of a list of
supported runtime features to make sure that modem and host are ready
to provide proper feature lists including port enumeration. Further
features can be enabled and controlled in this handshaking process.

Signed-off-by: Haijun Liu <haijun.liu@mediatek.com>
Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
Co-developed-by: Ricardo Martinez <ricardo.martinez@linux.intel.com>
Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com>

quoted hunk ↗ jump to hunk
+	ccci_h->packet_header = 0;
+	ccci_h->packet_len = cpu_to_le32(packet_size);
+	ccci_h->status &= cpu_to_le32(~HDR_FLD_CHN);
+	ccci_h->status |= cpu_to_le32(FIELD_PREP(HDR_FLD_CHN, port_static->tx_ch));
+	ccci_h->status &= cpu_to_le32(~HDR_FLD_SEQ);
+	ccci_h->ex_msg = 0;
...
quoted hunk ↗ jump to hunk
+		ccci_h->packet_header = cpu_to_le32(CCCI_HEADER_NO_DATA);
+		ccci_h->packet_len = cpu_to_le32(sizeof(*ctrl_msg_h) + CCCI_H_LEN);
+		ccci_h->status &= cpu_to_le32(~HDR_FLD_CHN);
+		ccci_h->status |= cpu_to_le32(FIELD_PREP(HDR_FLD_CHN, ch));
+		ccci_h->ex_msg = 0;
...
quoted hunk ↗ jump to hunk
+		ccci_h->packet_header = cpu_to_le32(CCCI_HEADER_NO_DATA);
+		ccci_h->packet_len = cpu_to_le32(msg);
+		ccci_h->status &= cpu_to_le32(~HDR_FLD_CHN);
+		ccci_h->status |= cpu_to_le32(FIELD_PREP(HDR_FLD_CHN, ch));
+		ccci_h->ex_msg = cpu_to_le32(ex_msg);
A helper to handle the common part of ccci_h init would be useful.


-- 
 i.
Thread (35 messages) 35 messages, 5 authors, last reply 2022-01-13
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help