mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
usb: gadget: rndis: Add new rndis parameters
Add pkt_alignment_factor rndis parameter. This parameter along with max_pkt_per_xfer allow rndis function driver to aggregate more than one IP packets per transfer. This is done by calling newly added API rndis_set_pkt_alignment_factor(). Change-Id: Ic9c543c388f872452e708a3a26be4ae82b54c082 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org> Signed-off-by: Jack Pham <jackp@codeaurora.org>
This commit is contained in:
parent
56a743ea1e
commit
f645ecc002
2 changed files with 17 additions and 1 deletions
|
|
@ -579,7 +579,7 @@ static int rndis_init_response(struct rndis_params *params,
|
|||
+ sizeof(struct ethhdr)
|
||||
+ sizeof(struct rndis_packet_msg_type)
|
||||
+ 22));
|
||||
resp->PacketAlignmentFactor = cpu_to_le32(0);
|
||||
resp->PacketAlignmentFactor = cpu_to_le32(params->pkt_alignment_factor);
|
||||
resp->AFListOffset = cpu_to_le32(0);
|
||||
resp->AFListSize = cpu_to_le32(0);
|
||||
|
||||
|
|
@ -1179,6 +1179,19 @@ int rndis_rm_hdr(struct gether *port,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(rndis_rm_hdr);
|
||||
|
||||
void rndis_set_pkt_alignment_factor(struct rndis_params *params,
|
||||
u8 pkt_alignment_factor)
|
||||
{
|
||||
pr_debug("%s:\n", __func__);
|
||||
|
||||
if (!params) {
|
||||
pr_err("%s: failed, params NULL\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
params->pkt_alignment_factor = pkt_alignment_factor;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_GADGET_DEBUG_FILES
|
||||
|
||||
static int rndis_proc_show(struct seq_file *m, void *v)
|
||||
|
|
|
|||
|
|
@ -172,6 +172,7 @@ typedef struct rndis_params {
|
|||
u32 vendorID;
|
||||
u8 max_pkt_per_xfer;
|
||||
const char *vendorDescr;
|
||||
u8 pkt_alignment_factor;
|
||||
void (*resp_avail)(void *v);
|
||||
void (*flow_ctrl_enable)(bool enable,
|
||||
struct rndis_params *params);
|
||||
|
|
@ -204,5 +205,7 @@ int rndis_signal_disconnect(struct rndis_params *params);
|
|||
int rndis_state(struct rndis_params *params);
|
||||
extern void rndis_set_host_mac(struct rndis_params *params, const u8 *addr);
|
||||
void rndis_flow_control(struct rndis_params *params, bool enable_flow_control);
|
||||
void rndis_set_pkt_alignment_factor(struct rndis_params *params,
|
||||
u8 pkt_alignment_factor);
|
||||
|
||||
#endif /* _LINUX_RNDIS_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue