} else {
- *(u8 *)skb_put(info->rx_skb, 1) = buf[i];
+ skb_put_u8(info->rx_skb, buf[i]);
info->rx_count--;
if (info->rx_count == 0) {
__u8 x = inb(iobase + DATA_L);
- *(u8 *)skb_put(info->rx_skb, 1) = x;
+ skb_put_u8(info->rx_skb, x);
inb(iobase + DATA_H);
info->rx_count--;
} else {
- *(u8 *)skb_put(info->rx_skb, 1) = inb(iobase + UART_RX);
+ skb_put_u8(info->rx_skb, inb(iobase + UART_RX));
info->rx_count--;
if (info->rx_count == 0) {
evt->ncmd = 0x01;
evt->opcode = cpu_to_le16(opcode);
- *(u8 *)skb_put(skb, 1) = 0x00;
+ skb_put_u8(skb, 0x00);
hci_skb_pkt_type(skb) = HCI_EVENT_PKT;
return ERR_PTR(-ENOMEM);
}
- *(u8 *)skb_put(skb, 1) = 0xf0;
- *(u8 *)skb_put(skb, 1) = enable;
+ skb_put_u8(skb, 0xf0);
+ skb_put_u8(skb, enable);
pipe = usb_sndbulkpipe(data->udev, data->diag_tx_ep->bEndpointAddress);
}
}
- *(u8 *)skb_put(info->rx_skb, 1) = inb(iobase + UART_RX);
+ skb_put_u8(info->rx_skb, inb(iobase + UART_RX));
nsh = (struct nsh *)info->rx_skb->data;
info->rx_count--;
skb_reserve(s, NSHL);
skb_copy_from_linear_data(skb, skb_put(s, skb->len), skb->len);
if (skb->len & 0x0001)
- *(u8 *)skb_put(s, 1) = 0; /* PAD */
+ skb_put_u8(s, 0); /* PAD */
/* Prepend skb with Nokia frame header and queue */
memcpy(skb_push(s, NSHL), &nsh, NSHL);
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, 1) = BCM_LM_DIAG_PKT;
- *(u8 *)skb_put(skb, 1) = 0xf0;
- *(u8 *)skb_put(skb, 1) = enable;
+ skb_put_u8(skb, BCM_LM_DIAG_PKT);
+ skb_put_u8(skb, 0xf0);
+ skb_put_u8(skb, enable);
skb_queue_tail(&bcm->txq, skb);
hci_uart_tx_wakeup(hu);
evt->ncmd = 0x01;
evt->opcode = cpu_to_le16(opcode);
- *(u8 *)skb_put(skb, 1) = 0x00;
+ skb_put_u8(skb, 0x00);
hci_skb_pkt_type(skb) = HCI_EVENT_PKT;
err = skb_pad(skb, 1);
if (err)
return err;
- *(u8 *)skb_put(skb, 1) = 0x00;
+ skb_put_u8(skb, 0x00);
}
skb_queue_tail(&btdev->txq, skb);
}
/* Assign HCI_IBS type */
- *(u8 *)skb_put(skb, 1) = cmd;
+ skb_put_u8(skb, cmd);
skb_queue_tail(&qca->txq, skb);
hci_skb_pkt_type(skb) = HCI_VENDOR_PKT;
- *(u8 *)skb_put(skb, 1) = 0xff;
- *(u8 *)skb_put(skb, 1) = opcode;
+ skb_put_u8(skb, 0xff);
+ skb_put_u8(skb, opcode);
put_unaligned_le16(hdev->id, skb_put(skb, 2));
skb_queue_tail(&data->readq, skb);
skb = mp->outskb;
if (skb) {
if (skb_tailroom(skb) > 0) {
- *(u8 *)skb_put(skb, 1) = ch;
+ skb_put_u8(skb, ch);
goto unlock_out;
}
mp->outskb = NULL;
skb = alloc_skb(CAPI_DATA_B3_REQ_LEN + CAPI_MAX_BLKSIZE, GFP_ATOMIC);
if (skb) {
skb_reserve(skb, CAPI_DATA_B3_REQ_LEN);
- *(u8 *)skb_put(skb, 1) = ch;
+ skb_put_u8(skb, ch);
mp->outskb = skb;
} else {
printk(KERN_ERR "capinc_put_char: char %u lost\n", ch);
hdlc_skb->mac_len = skb->mac_len;
/* Add flag sequence in front of everything.. */
- *(u8 *)skb_put(hdlc_skb, 1) = PPP_FLAG;
+ skb_put_u8(hdlc_skb, PPP_FLAG);
/* Perform byte stuffing while copying data. */
while (skb->len--) {
if (muststuff(*skb->data)) {
- *(u8 *)skb_put(hdlc_skb, 1) = PPP_ESCAPE;
- *(u8 *)skb_put(hdlc_skb, 1) = (*skb->data++) ^ PPP_TRANS;
+ skb_put_u8(hdlc_skb, PPP_ESCAPE);
+ skb_put_u8(hdlc_skb, (*skb->data++) ^ PPP_TRANS);
} else
- *(u8 *)skb_put(hdlc_skb, 1) = *skb->data++;
+ skb_put_u8(hdlc_skb, *skb->data++);
}
/* Finally add FCS (byte stuffed) and flag sequence */
c = (fcs & 0x00ff); /* least significant byte first */
if (muststuff(c)) {
- *(u8 *)skb_put(hdlc_skb, 1) = PPP_ESCAPE;
+ skb_put_u8(hdlc_skb, PPP_ESCAPE);
c ^= PPP_TRANS;
}
- *(u8 *)skb_put(hdlc_skb, 1) = c;
+ skb_put_u8(hdlc_skb, c);
c = ((fcs >> 8) & 0x00ff);
if (muststuff(c)) {
- *(u8 *)skb_put(hdlc_skb, 1) = PPP_ESCAPE;
+ skb_put_u8(hdlc_skb, PPP_ESCAPE);
c ^= PPP_TRANS;
}
- *(u8 *)skb_put(hdlc_skb, 1) = c;
+ skb_put_u8(hdlc_skb, c);
- *(u8 *)skb_put(hdlc_skb, 1) = PPP_FLAG;
+ skb_put_u8(hdlc_skb, PPP_FLAG);
dev_kfree_skb_any(skb);
return hdlc_skb;
while (len--) {
c = bitrev8(*cp++);
if (c == DLE_FLAG)
- *(u8 *)skb_put(iraw_skb, 1) = c;
- *(u8 *)skb_put(iraw_skb, 1) = c;
+ skb_put_u8(iraw_skb, c);
+ skb_put_u8(iraw_skb, c);
}
dev_kfree_skb_any(skb);
return iraw_skb;
* Do not emit a completely useless byte of ones.
*/
if (bitno < 32 && skb_out && skb_tailroom(skb_out) > 0)
- *(u8 *)skb_put(skb_out, 1) = (unsigned char)((accm | (0xff << (bitno - 8))) >> 24);
+ skb_put_u8(skb_out,
+ (unsigned char)((accm | (0xff << (bitno - 8))) >> 24));
/*
* Increase code size if we would have without the packet
db->bytes_out += ilen;
if (skb_tailroom(skb_out) > 0)
- *(u8 *)skb_put(skb_out, 1) = 0;
+ skb_put_u8(skb_out, 0);
else
return DECOMP_ERR_NOMEM;
#endif
if (extra) /* the KwKwK case again */
- *(u8 *)skb_put(skb_out, 1) = finchar;
+ skb_put_u8(skb_out, finchar);
/*
* If not first code in a packet, and
skb = dev_alloc_skb(1);
if (skb) {
- *(u8 *)skb_put(skb, 1) = X25_IFACE_CONNECT;
+ skb_put_u8(skb, X25_IFACE_CONNECT);
skb->protocol = x25_type_trans(skb, cprot->net_dev);
netif_rx(skb);
return 0;
*state_p = WAN_DISCONNECTED;
skb = dev_alloc_skb(1);
if (skb) {
- *(u8 *)skb_put(skb, 1) = X25_IFACE_DISCONNECT;
+ skb_put_u8(skb, X25_IFACE_DISCONNECT);
skb->protocol = x25_type_trans(skb, cprot->net_dev);
netif_rx(skb);
return 0;
}
scc->rx_buff = skb;
- *(u8 *)skb_put(skb, 1) = 0; /* KISS data */
+ skb_put_u8(skb, 0); /* KISS data */
}
if (skb->len >= scc->stat.bufsize)
return;
}
- *(u8 *)skb_put(skb, 1) = Inb(scc->data);
+ skb_put_u8(skb, Inb(scc->data));
}
skb_put_zero(skb_out, padding_count);
} else if (skb_out->len < ctx->tx_max &&
(skb_out->len % dev->maxpacket) == 0) {
- *(u8 *)skb_put(skb_out, 1) = 0; /* force short packet */
+ skb_put_u8(skb_out, 0); /* force short packet */
}
/* set final frame length */
/* maybe pad; then trailer */
if (!((skb->len + sizeof *trailer) & 0x01))
- *(u8 *)skb_put(skb, 1) = PAD_BYTE;
+ skb_put_u8(skb, PAD_BYTE);
trailer = skb_put(skb, sizeof *trailer);
put_unaligned(header->packet_id, &trailer->packet_id);
#if 0
fcs = crc32_le(~0, skb->data, skb->len);
fcs = ~fcs;
- *(u8 *)skb_put(skb, 1) = fcs & 0xff;
- *(u8 *)skb_put(skb, 1) = (fcs>> 8) & 0xff;
- *(u8 *)skb_put(skb, 1) = (fcs>>16) & 0xff;
- *(u8 *)skb_put(skb, 1) = (fcs>>24) & 0xff;
+ skb_put_u8(skb, fcs & 0xff);
+ skb_put_u8(skb, (fcs >> 8) & 0xff);
+ skb_put_u8(skb, (fcs >> 16) & 0xff);
+ skb_put_u8(skb, (fcs >> 24) & 0xff);
}
return skb;
}
for (i = 0; i < len + 2; i++)
lrc ^= skb->data[i];
- *(u8 *)skb_put(skb, 1) = lrc;
+ skb_put_u8(skb, lrc);
}
static void fdp_nci_i2c_remove_len_lrc(struct sk_buff *skb)
for (i = 0; i < skb->len; i++)
crc = crc ^ skb->data[i];
- *(u8 *)skb_put(skb, 1) = crc;
+ skb_put_u8(skb, crc);
}
static void microread_i2c_remove_len_crc(struct sk_buff *skb)
goto flush;
}
- *(u8 *)skb_put(*skb, 1) = len;
+ skb_put_u8(*skb, len);
r = i2c_master_recv(client, skb_put(*skb, len), len);
if (r != len) {
crc = crc_ccitt(0xffff, skb->data, skb->len);
crc = ~crc;
- *(u8 *)skb_put(skb, 1) = crc & 0xff;
- *(u8 *)skb_put(skb, 1) = crc >> 8;
+ skb_put_u8(skb, crc & 0xff);
+ skb_put_u8(skb, crc >> 8);
break;
case MICROREAD_GATE_ID_MREAD_NFC_T3:
control_bits = 0xDB;
out_skb = alloc_lc_skb(priv, 1);
if (!out_skb)
return -ENOMEM;
- *(u8 *)skb_put(out_skb, 1) = 0xBF;
+ skb_put_u8(out_skb, 0xBF);
nci_send_frame(priv->ndev, out_skb);
priv->fw_dnld.substate = SUBSTATE_WAIT_NACK_CREDIT;
return 0;
out_skb = alloc_lc_skb(priv, 1);
if (!out_skb)
return -ENOMEM;
- *(u8 *)skb_put(out_skb, 1) = HELPER_ACK_PACKET_FORMAT;
+ skb_put_u8(out_skb, HELPER_ACK_PACKET_FORMAT);
nci_send_frame(priv->ndev, out_skb);
priv->fw_dnld.substate = SUBSTATE_WAIT_ACK_CREDIT;
break;
return NULL;
/* DEP support only */
- *(u8 *)skb_put(skb, 1) = PN533_INIT_TARGET_DEP;
+ skb_put_u8(skb, PN533_INIT_TARGET_DEP);
/* MIFARE params */
skb_put_data(skb, mifare_params, 6);
memcpy(nfcid3, felica, 8);
/* General bytes */
- *(u8 *)skb_put(skb, 1) = gbytes_len;
+ skb_put_u8(skb, gbytes_len);
gb = skb_put_data(skb, gbytes, gbytes_len);
/* Len Tk */
- *(u8 *)skb_put(skb, 1) = 0;
+ skb_put_u8(skb, 0);
return skb;
}
if (!skb)
return;
- *(u8 *)skb_put(skb, 1) = PN533_CFGITEM_RF_FIELD;
- *(u8 *)skb_put(skb, 1) = PN533_CFGITEM_RF_FIELD_AUTO_RFCA;
+ skb_put_u8(skb, PN533_CFGITEM_RF_FIELD);
+ skb_put_u8(skb, PN533_CFGITEM_RF_FIELD_AUTO_RFCA);
rc = pn533_send_cmd_async(dev, PN533_CMD_RF_CONFIGURATION, skb,
pn533_rf_complete, NULL);
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, 1) = 0x01; /* Active */
- *(u8 *)skb_put(skb, 1) = 0x02; /* 424 kbps */
+ skb_put_u8(skb, 0x01); /* Active */
+ skb_put_u8(skb, 0x02); /* 424 kbps */
next = skb_put(skb, 1); /* Next */
*next = 0;
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, sizeof(u8)) = 1; /* TG */
- *(u8 *)skb_put(skb, sizeof(u8)) = 0; /* Next */
+ skb_put_u8(skb, 1); /* TG */
+ skb_put_u8(skb, 0); /* Next */
resp = pn533_send_cmd_sync(dev, PN533_CMD_IN_ATR, skb);
if (IS_ERR(resp))
if (!skb)
return;
- *(u8 *)skb_put(skb, 1) = 1; /* TG*/
+ skb_put_u8(skb, 1); /* TG*/
rc = pn533_send_cmd_async(dev, PN533_CMD_IN_RELEASE, skb,
pn533_deactivate_target_complete, NULL);
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, 1) = !comm_mode; /* ActPass */
- *(u8 *)skb_put(skb, 1) = 0x02; /* 424 kbps */
+ skb_put_u8(skb, !comm_mode); /* ActPass */
+ skb_put_u8(skb, 0x02); /* 424 kbps */
next = skb_put(skb, 1); /* Next */
*next = 0;
break;
}
default:
- *(u8 *)skb_put(skb, sizeof(u8)) = 1; /*TG*/
+ skb_put_u8(skb, 1); /*TG*/
rc = pn533_send_cmd_direct_async(dev,
PN533_CMD_IN_DATA_EXCHANGE,
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, sizeof(cfgitem)) = cfgitem;
+ skb_put_u8(skb, cfgitem);
skb_put_data(skb, cfgdata, cfgdata_len);
resp = pn533_send_cmd_sync(dev, PN533_CMD_RF_CONFIGURATION, skb);
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, sizeof(u8)) = 0x1;
+ skb_put_u8(skb, 0x1);
resp = pn533_send_cmd_sync(dev, 0x18, skb);
if (IS_ERR(resp))
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, 1) = 0x01;
+ skb_put_u8(skb, 0x01);
resp = pn533_send_cmd_sync(dev, PN533_CMD_SAM_CONFIGURATION, skb);
if (IS_ERR(resp))
crc = crc_ccitt(0xffff, skb->data, skb->len);
crc = ~crc;
- *(u8 *)skb_put(skb, 1) = crc & 0xff;
- *(u8 *)skb_put(skb, 1) = crc >> 8;
+ skb_put_u8(skb, crc & 0xff);
+ skb_put_u8(skb, crc >> 8);
}
static void pn544_hci_i2c_remove_len_crc(struct sk_buff *skb)
goto flush;
}
- *(u8 *)skb_put(*skb, 1) = len;
+ skb_put_u8(*skb, len);
r = i2c_master_recv(client, skb_put(*skb, len), len);
if (r != len) {
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, sizeof(u8)) = command_type;
+ skb_put_u8(skb, command_type);
resp = port100_send_cmd_sync(dev, PORT100_CMD_SET_COMMAND_TYPE, skb);
if (IS_ERR(resp))
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, 1) = on ? 1 : 0;
+ skb_put_u8(skb, on ? 1 : 0);
/* Cancel the last command if the device is being switched off */
if (!on)
crc = ~crc;
tmp = crc & 0x00ff;
- *(u8 *)skb_put(skb, 1) = tmp;
+ skb_put_u8(skb, tmp);
tmp = (crc >> 8) & 0x00ff;
- *(u8 *)skb_put(skb, 1) = tmp;
+ skb_put_u8(skb, tmp);
}
static void st21nfca_hci_remove_len_crc(struct sk_buff *skb)
st21nfca_hci_add_len_crc(skb);
/* add ST21NFCA_SOF_EOF on tail */
- *(u8 *)skb_put(skb, 1) = ST21NFCA_SOF_EOF;
+ skb_put_u8(skb, ST21NFCA_SOF_EOF);
/* add ST21NFCA_SOF_EOF on head */
*(u8 *)skb_push(skb, 1) = ST21NFCA_SOF_EOF;
switch (stcontext->current_rf_tech) {
case NFC_DIGITAL_RF_TECH_106A:
len_data_to_tag = skb->len + 1;
- *(u8 *)skb_put(skb, 1) = stcontext->sendrcv_trflag;
+ skb_put_u8(skb, stcontext->sendrcv_trflag);
break;
case NFC_DIGITAL_RF_TECH_106B:
case NFC_DIGITAL_RF_TECH_ISO15693:
return tmp;
}
+static inline void skb_put_u8(struct sk_buff *skb, u8 val)
+{
+ *(u8 *)skb_put(skb, 1) = val;
+}
+
void *skb_push(struct sk_buff *skb, unsigned int len);
static inline void *__skb_push(struct sk_buff *skb, unsigned int len)
{
put_unaligned_le16(format, skb_put(skb, 2));
skb_put_data(skb, ver, sizeof(ver));
put_unaligned_le32(flags, skb_put(skb, 4));
- *(u8 *)skb_put(skb, 1) = TASK_COMM_LEN;
+ skb_put_u8(skb, TASK_COMM_LEN);
skb_put_data(skb, hci_pi(sk)->comm, TASK_COMM_LEN);
__net_timestamp(skb);
return -ENOMEM;
}
- *(u8 *)skb_put(skb, 1) = hdr;
+ skb_put_u8(skb, hdr);
if (data && size > 0)
skb_put_data(skb, data, size);
msg->info = scp->info_loc;
msg->segsize = cpu_to_le16(scp->segsize_loc);
- *(u8 *)skb_put(skb, 1) = len;
+ skb_put_u8(skb, len);
if (len > 0)
skb_put_data(skb, scp->conndata_out.opt_data, len);
if (scp->peer.sdn_flags & SDF_UICPROXY)
menuver |= DN_MENUVER_UIC;
- *(u8 *)skb_put(skb, 1) = menuver; /* Menu Version */
+ skb_put_u8(skb, menuver); /* Menu Version */
aux = scp->accessdata.acc_userl;
- *(u8 *)skb_put(skb, 1) = aux;
+ skb_put_u8(skb, aux);
if (aux > 0)
skb_put_data(skb, scp->accessdata.acc_user, aux);
aux = scp->accessdata.acc_passl;
- *(u8 *)skb_put(skb, 1) = aux;
+ skb_put_u8(skb, aux);
if (aux > 0)
skb_put_data(skb, scp->accessdata.acc_pass, aux);
aux = scp->accessdata.acc_accl;
- *(u8 *)skb_put(skb, 1) = aux;
+ skb_put_u8(skb, aux);
if (aux > 0)
skb_put_data(skb, scp->accessdata.acc_acc, aux);
aux = (__u8)le16_to_cpu(scp->conndata_out.opt_optl);
- *(u8 *)skb_put(skb, 1) = aux;
+ skb_put_u8(skb, aux);
if (aux > 0)
skb_put_data(skb, scp->conndata_out.opt_data, aux);
if (msb_first)
crc = __fswab16(crc);
- *(u8 *)skb_put(skb, 1) = crc & 0xFF;
- *(u8 *)skb_put(skb, 1) = (crc >> 8) & 0xFF;
+ skb_put_u8(skb, crc & 0xFF);
+ skb_put_u8(skb, (crc >> 8) & 0xFF);
}
int digital_skb_check_crc(struct sk_buff *skb, crc_func_t crc_func,
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, 1) = rtox;
+ skb_put_u8(skb, rtox);
skb_push(skb, sizeof(struct digital_dep_req_res));
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, 1) = DIGITAL_RATS_BYTE1;
- *(u8 *)skb_put(skb, 1) = DIGITAL_RATS_PARAM;
+ skb_put_u8(skb, DIGITAL_RATS_BYTE1);
+ skb_put_u8(skb, DIGITAL_RATS_PARAM);
rc = digital_in_send_cmd(ddev, skb, 30, digital_in_recv_ats,
target);
else
sel_cmd = DIGITAL_CMD_SEL_REQ_CL3;
- *(u8 *)skb_put(skb, sizeof(u8)) = sel_cmd;
- *(u8 *)skb_put(skb, sizeof(u8)) = DIGITAL_SDD_REQ_SEL_PAR;
+ skb_put_u8(skb, sel_cmd);
+ skb_put_u8(skb, DIGITAL_SDD_REQ_SEL_PAR);
return digital_in_send_cmd(ddev, skb, 30, digital_in_recv_sdd_res,
target);
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, sizeof(u8)) = DIGITAL_CMD_SENS_REQ;
+ skb_put_u8(skb, DIGITAL_CMD_SENS_REQ);
rc = digital_in_send_cmd(ddev, skb, 30, digital_in_recv_sens_res, NULL);
if (rc)
if (!skb)
return -ENOMEM;
- *(u8 *)skb_put(skb, 1) = DIGITAL_SEL_RES_NFC_DEP;
+ skb_put_u8(skb, DIGITAL_SEL_RES_NFC_DEP);
if (!DIGITAL_DRV_CAPS_TG_CRC(ddev))
digital_skb_add_crc_a(skb);
return;
}
- *(u8 *)skb_put(hcp_skb, NFC_HCI_HCP_PACKET_HEADER_LEN) = pipe;
+ skb_put_u8(hcp_skb, pipe);
skb_queue_walk(&hdev->rx_hcp_frags, frag_skb) {
msg_len = frag_skb->len - NFC_HCI_HCP_PACKET_HEADER_LEN;
if (skb == NULL)
return -ENOMEM;
- *(u8 *)skb_put(skb, 1) = SHDLC_MAX_WINDOW;
- *(u8 *)skb_put(skb, 1) = SHDLC_SREJ_SUPPORT ? 1 : 0;
+ skb_put_u8(skb, SHDLC_MAX_WINDOW);
+ skb_put_u8(skb, SHDLC_SREJ_SUPPORT ? 1 : 0);
return llc_shdlc_send_u_frame(shdlc, skb, U_FRAME_RSET);
}
return;
}
- *(u8 *)skb_put(hcp_skb, NCI_HCI_HCP_PACKET_HEADER_LEN) = pipe;
+ skb_put_u8(hcp_skb, pipe);
skb_queue_walk(&ndev->hci_dev->rx_hcp_frags, frag_skb) {
msg_len = frag_skb->len - NCI_HCI_HCP_PACKET_HEADER_LEN;
u16 crc;
crc = crc_ccitt(CRC_INIT, skb->data, skb->len);
- *(u8 *)skb_put(skb, 1) = crc >> 8;
- *(u8 *)skb_put(skb, 1) = crc & 0xFF;
+ skb_put_u8(skb, crc >> 8);
+ skb_put_u8(skb, crc & 0xFF);
}
if (write_handshake_completion) {
hdr[3] = 0;
crc = crc_ccitt(CRC_INIT, skb->data, skb->len);
- *(u8 *)skb_put(skb, 1) = crc >> 8;
- *(u8 *)skb_put(skb, 1) = crc & 0xFF;
+ skb_put_u8(skb, crc >> 8);
+ skb_put_u8(skb, crc & 0xFF);
ret = __nci_spi_send(nspi, skb, 0);
/* Eat byte after byte till full packet header is received */
if (nu->rx_skb->len < NCI_CTRL_HDR_SIZE) {
- *(u8 *)skb_put(nu->rx_skb, 1) = *data++;
+ skb_put_u8(nu->rx_skb, *data++);
--count;
continue;
}