On Thu, Dec 03, 2026 at 09:40:54PM +0530, Vishnu Santhosh wrote:
> Newer modem firmware can use QMAP to carry several data connections over > one BAM-DMUX channel, with the rmnet driver handling QMAP on top of the > BAM-DMUX network interfaces.
Nitpick: "Newer" is a quite ambiguous term here. Most MSM8916 from 2015 (11 years ago) already support QMAP. I think I only had a single device with an old modem firmware from 2014 that did not support that yet. The reason I never added support for QMAP is that BAM-DMUX itself already supports multiple data connections through its channels, so that alone is not a reason to use the more complex QMAP approach. What you might gain is support for aggregation/flow control that are also implemented in the rmnet driver, although I don't remember if I was able to determine back then if this is actually functional on BAM-DMUX platforms (it's been 6 years since I tried). Please add a motivation to the commit message to explain what we really gain in practice from enabling this feature.
> The modem only enables QMAP on a channel if > bit 1 is set in the signal byte of the OPEN command it receives. The > driver always sends 0, so QMAP stays disabled. > > The modem sets the same bit in its own OPEN command if it supports QMAP. > Remember the bit for each channel and set it in the OPEN command sent to > the modem. The modem always opens a channel before its network interface > is created, so the bit is known by the time ndo_open() sends the OPEN > command. Firmware that does not set the bit is not affected. > > Co-developed-by: Deepak Kumar Singh <deep…@oss.qualcomm.com> > Signed-off-by: Deepak Kumar Singh <deep…@oss.qualcomm.com> > Signed-off-by: Vishnu Santhosh <vish…@oss.qualcomm.com> > --- > drivers/net/wwan/qcom_bam_dmux.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wwan/qcom_bam_dmux.c b/drivers/net/wwan/qcom_bam_dmux.c > index a7d05b1b8b1230d1d54e9a7abcbc16a16681797e..9e82a30b16a68d786cd7523a8d6a8bb52dd9fe89 100644 > --- a/drivers/net/wwan/qcom_bam_dmux.c > +++ b/drivers/net/wwan/qcom_bam_dmux.c > @@ -32,6 +32,9 @@ > #define BAM_DMUX_HDR_MAGIC 0x33fc > #define BAM_DMUX_LEN_FROM_DMA 0xffff > > +/* Signal bits in OPEN commands */ > +#define BAM_DMUX_OPEN_QMAP BIT(1) > +
The downstream bam_dmux driver calls this bit "DYNAMIC_MTU_MASK" and it's a bit more involved than just a simple "QMAP" signal [1]. It's used for some kind of dynamic MTU negotiation feature where both sides dynamically negotiate the MTU/buffer sizes, once statically during OPEN and technically also dynamically later on new DATA packets. I recall that signaling this bit is required for QMAP to work, but is only indirectly related to it. Based on your patch, it's not clear to me if this feature was simplified for Shikra or you have intentionally implemented it only partially with no reference to the dynamic MTU feature. Please explain the impact/applicability for older platforms in the commit message. Thanks, Stephan [1]: https://git.codelinaro.org/clo/la/kernel/msm-4.9/-/blob/dd6b65e15999156292e8108ec45062a419bbe98a/drivers/soc/qcom/bam_dmux.c#L1006-L1062