Lines Matching refs:c
26 static inline int muststuff(unsigned char c) in muststuff() argument
28 if (c < PPP_TRANS) return 1; in muststuff()
29 if (c == PPP_FLAG) return 1; in muststuff()
30 if (c == PPP_ESCAPE) return 1; in muststuff()
55 unsigned char c; in cmd_loop() local
58 c = *src++; in cmd_loop()
61 switch (c) { in cmd_loop()
83 cs->respdata[0] = c; in cmd_loop()
107 cs->respdata[cbytes] = c; in cmd_loop()
147 unsigned char c; in hdlc_loop() local
157 c = *src++; in hdlc_loop()
159 if (c == DLE_FLAG) { in hdlc_loop()
170 if (c == PPP_ESCAPE) { in hdlc_loop()
178 c = *src++; in hdlc_loop()
180 if (c == DLE_FLAG) { in hdlc_loop()
192 c ^= PPP_TRANS; in hdlc_loop()
194 if (!muststuff(c)) in hdlc_loop()
195 gig_dbg(DEBUG_HDLC, "byte stuffed: 0x%02x", c); in hdlc_loop()
197 } else if (c == PPP_FLAG) { in hdlc_loop()
245 } else if (muststuff(c)) { in hdlc_loop()
247 gig_dbg(DEBUG_HDLC, "not byte stuffed: 0x%02x", c); in hdlc_loop()
267 *__skb_put(skb, 1) = c; in hdlc_loop()
268 fcs = crc_ccitt_byte(fcs, c); in hdlc_loop()
293 unsigned char c; in iraw_loop() local
302 c = *src++; in iraw_loop()
305 if (c == DLE_FLAG) { in iraw_loop()
318 *__skb_put(skb, 1) = bitrev8(c); in iraw_loop()
462 unsigned char c; in HDLC_Encode() local
507 c = (fcs & 0x00ff); /* least significant byte first */ in HDLC_Encode()
508 if (muststuff(c)) { in HDLC_Encode()
510 c ^= PPP_TRANS; in HDLC_Encode()
512 *(skb_put(hdlc_skb, 1)) = c; in HDLC_Encode()
514 c = ((fcs >> 8) & 0x00ff); in HDLC_Encode()
515 if (muststuff(c)) { in HDLC_Encode()
517 c ^= PPP_TRANS; in HDLC_Encode()
519 *(skb_put(hdlc_skb, 1)) = c; in HDLC_Encode()
539 unsigned char c; in iraw_encode() local
562 c = bitrev8(*cp++); in iraw_encode()
563 if (c == DLE_FLAG) in iraw_encode()
564 *(skb_put(iraw_skb, 1)) = c; in iraw_encode()
565 *(skb_put(iraw_skb, 1)) = c; in iraw_encode()