diff options
author | Sjur Brændeland <sjur.brandeland@stericsson.com> | 2011-04-11 06:43:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-11 18:08:48 -0400 |
commit | 4dd820c088d201e526840c9dbc2f0b87a0a41868 (patch) | |
tree | fac7a3a70bd32df3104ae6f1273a727fb0fa006f /net/caif/cfmuxl.c | |
parent | 73d6ac633c6c0ca703f90db0b808d9593e46aef6 (diff) |
caif: Don't resend if dev_queue_xmit fails.
If CAIF Link Layer returns an error, we no longer try to re-build the
CAIF packet and resend it. Instead, we simply return any transmission
errors to the socket client.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif/cfmuxl.c')
-rw-r--r-- | net/caif/cfmuxl.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/caif/cfmuxl.c b/net/caif/cfmuxl.c index f8ce0f3d9210..ebfda2c9290b 100644 --- a/net/caif/cfmuxl.c +++ b/net/caif/cfmuxl.c | |||
@@ -184,7 +184,6 @@ static int cfmuxl_receive(struct cflayer *layr, struct cfpkt *pkt) | |||
184 | 184 | ||
185 | static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt) | 185 | static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt) |
186 | { | 186 | { |
187 | int ret; | ||
188 | struct cfmuxl *muxl = container_obj(layr); | 187 | struct cfmuxl *muxl = container_obj(layr); |
189 | u8 linkid; | 188 | u8 linkid; |
190 | struct cflayer *dn; | 189 | struct cflayer *dn; |
@@ -198,11 +197,7 @@ static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt) | |||
198 | info->hdr_len += 1; | 197 | info->hdr_len += 1; |
199 | linkid = info->channel_id; | 198 | linkid = info->channel_id; |
200 | cfpkt_add_head(pkt, &linkid, 1); | 199 | cfpkt_add_head(pkt, &linkid, 1); |
201 | ret = dn->transmit(dn, pkt); | 200 | return dn->transmit(dn, pkt); |
202 | /* Remove MUX protocol header upon error. */ | ||
203 | if (ret < 0) | ||
204 | cfpkt_extr_head(pkt, &linkid, 1); | ||
205 | return ret; | ||
206 | } | 201 | } |
207 | 202 | ||
208 | static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, | 203 | static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, |