diff options
Diffstat (limited to 'drivers/nfc/st21nfca/dep.c')
-rw-r--r-- | drivers/nfc/st21nfca/dep.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/nfc/st21nfca/dep.c b/drivers/nfc/st21nfca/dep.c index 798a32bbac5d..fd08be2917e6 100644 --- a/drivers/nfc/st21nfca/dep.c +++ b/drivers/nfc/st21nfca/dep.c @@ -315,10 +315,10 @@ int st21nfca_tm_send_dep_res(struct nfc_hci_dev *hdev, struct sk_buff *skb) int r; struct st21nfca_hci_info *info = nfc_hci_get_clientdata(hdev); - *skb_push(skb, 1) = info->dep_info.curr_nfc_dep_pni; - *skb_push(skb, 1) = ST21NFCA_NFCIP1_DEP_RES; - *skb_push(skb, 1) = ST21NFCA_NFCIP1_RES; - *skb_push(skb, 1) = skb->len; + *(u8 *)skb_push(skb, 1) = info->dep_info.curr_nfc_dep_pni; + *(u8 *)skb_push(skb, 1) = ST21NFCA_NFCIP1_DEP_RES; + *(u8 *)skb_push(skb, 1) = ST21NFCA_NFCIP1_RES; + *(u8 *)skb_push(skb, 1) = skb->len; r = nfc_hci_send_event(hdev, ST21NFCA_RF_CARD_F_GATE, ST21NFCA_EVT_SEND_DATA, skb->data, skb->len); @@ -466,7 +466,7 @@ static void st21nfca_im_send_psl_req(struct nfc_hci_dev *hdev, u8 did, u8 bsi, psl_req->brs = (0x30 & bsi << 4) | (bri & 0x03); psl_req->fsl = lri; - *skb_push(skb, 1) = info->dep_info.to | 0x10; + *(u8 *)skb_push(skb, 1) = info->dep_info.to | 0x10; st21nfca_im_send_pdu(info, skb); } @@ -564,11 +564,11 @@ int st21nfca_im_send_atr_req(struct nfc_hci_dev *hdev, u8 *gb, size_t gb_len) atr_req->ppi = ST21NFCA_LR_BITS_PAYLOAD_SIZE_254B; if (gb_len) { atr_req->ppi |= ST21NFCA_GB_BIT; - memcpy(skb_put(skb, gb_len), gb, gb_len); + skb_put_data(skb, gb, gb_len); } atr_req->length = sizeof(struct st21nfca_atr_req) + hdev->gb_len; - *skb_push(skb, 1) = info->dep_info.to | 0x10; /* timeout */ + *(u8 *)skb_push(skb, 1) = info->dep_info.to | 0x10; /* timeout */ info->async_cb_type = ST21NFCA_CB_TYPE_READER_F; info->async_cb_context = info; @@ -629,10 +629,10 @@ static void st21nfca_im_recv_dep_res_cb(void *context, struct sk_buff *skb, case ST21NFCA_NFC_DEP_PFB_SUPERVISOR_PDU: pr_err("Received a SUPERVISOR PDU\n"); skb_pull(skb, size); - *skb_push(skb, 1) = ST21NFCA_NFCIP1_DEP_REQ; - *skb_push(skb, 1) = ST21NFCA_NFCIP1_REQ; - *skb_push(skb, 1) = skb->len; - *skb_push(skb, 1) = info->dep_info.to | 0x10; + *(u8 *)skb_push(skb, 1) = ST21NFCA_NFCIP1_DEP_REQ; + *(u8 *)skb_push(skb, 1) = ST21NFCA_NFCIP1_REQ; + *(u8 *)skb_push(skb, 1) = skb->len; + *(u8 *)skb_push(skb, 1) = info->dep_info.to | 0x10; st21nfca_im_send_pdu(info, skb); break; @@ -655,12 +655,12 @@ int st21nfca_im_send_dep_req(struct nfc_hci_dev *hdev, struct sk_buff *skb) info->async_cb_context = info; info->async_cb = st21nfca_im_recv_dep_res_cb; - *skb_push(skb, 1) = info->dep_info.curr_nfc_dep_pni; - *skb_push(skb, 1) = ST21NFCA_NFCIP1_DEP_REQ; - *skb_push(skb, 1) = ST21NFCA_NFCIP1_REQ; - *skb_push(skb, 1) = skb->len; + *(u8 *)skb_push(skb, 1) = info->dep_info.curr_nfc_dep_pni; + *(u8 *)skb_push(skb, 1) = ST21NFCA_NFCIP1_DEP_REQ; + *(u8 *)skb_push(skb, 1) = ST21NFCA_NFCIP1_REQ; + *(u8 *)skb_push(skb, 1) = skb->len; - *skb_push(skb, 1) = info->dep_info.to | 0x10; + *(u8 *)skb_push(skb, 1) = info->dep_info.to | 0x10; return nfc_hci_send_cmd_async(hdev, ST21NFCA_RF_READER_F_GATE, ST21NFCA_WR_XCHG_DATA, |