Searched refs:swab16 (Results 1 - 69 of 69) sorted by relevance

/linux-4.4.14/arch/avr32/mach-at32ap/include/mach/
H A Dio.h14 # define __mem_ioswabw(a, x) swab16(x)
24 # define __mem_ioswabw(a, x) swab16(x)
31 # define ioswabw(a, x) swab16(x)
/linux-4.4.14/include/linux/
H A Dswab.h6 # define swab16 __swab16 macro
H A Di2c.h34 #include <linux/swab.h> /* for swab16 */
103 return (value < 0) ? value : swab16(value); i2c_smbus_read_word_swapped()
110 return i2c_smbus_write_word_data(client, command, swab16(value)); i2c_smbus_write_word_swapped()
/linux-4.4.14/arch/powerpc/boot/
H A Dswab.h4 static inline u16 swab16(u16 x) swab16() function
H A Dof.h29 #define cpu_to_be16(x) swab16(x)
30 #define be16_to_cpu(x) swab16(x)
/linux-4.4.14/drivers/net/ethernet/i825xx/
H A Dsun3_82586.c64 #define make32(ptr16) (p->memtop + (swab16((unsigned short) (ptr16))) )
66 #define make16(ptr32) (swab16((unsigned short) ((unsigned long)(ptr32) - (unsigned long) p->memtop )))
117 if(swab16((addr)->cmd_status) & STAT_COMPL) break; \
420 cfg_cmd->cmd_cmd = swab16(CMD_CONFIGURE | CMD_LAST); init586()
451 if((swab16(cfg_cmd->cmd_status) & (STAT_OK|STAT_COMPL)) != (STAT_COMPL|STAT_OK)) init586()
453 printk("%s: configure command failed: %x\n",dev->name,swab16(cfg_cmd->cmd_status)); init586()
464 ias_cmd->cmd_cmd = swab16(CMD_IASETUP | CMD_LAST); init586()
476 if((swab16(ias_cmd->cmd_status) & (STAT_OK|STAT_COMPL)) != (STAT_OK|STAT_COMPL)) { init586()
477 printk("%s (82586): individual address setup command failed: %04x\n",dev->name,swab16(ias_cmd->cmd_status)); init586()
488 tdr_cmd->cmd_cmd = swab16(CMD_TDR | CMD_LAST); init586()
498 if(!(swab16(tdr_cmd->cmd_status) & STAT_COMPL)) init586()
505 result = swab16(tdr_cmd->status); init586()
532 mc_cmd->cmd_cmd = swab16(CMD_MCSETUP | CMD_LAST); init586()
534 mc_cmd->mc_cnt = swab16(num_addrs * 6); init586()
547 if( (swab16(mc_cmd->cmd_status) & (STAT_COMPL|STAT_OK)) != (STAT_COMPL|STAT_OK) ) init586()
558 p->nop_cmds[i]->cmd_cmd = swab16(CMD_NOP); init586()
567 p->nop_cmds[i]->cmd_cmd = swab16(CMD_NOP); init586()
595 p->xmit_cmds[i]->cmd_status = swab16(STAT_COMPL); init586()
596 p->xmit_cmds[i]->cmd_cmd = swab16(CMD_XMIT | CMD_INT); init586()
618 p->xmit_cmds[0]->cmd_cmd = swab16(CMD_XMIT | CMD_SUSPEND | CMD_INT); init586()
666 rbd[i].size = swab16(RECV_BUFF_SIZE); alloc_rfa()
777 if( (totlen = swab16(rbd->status)) & RBD_LAST) /* the first and the last buffer? */ sun3_82586_rcv_int()
799 while(!((rstat=swab16(rbd->status)) & RBD_LAST)) sun3_82586_rcv_int()
913 status = swab16(p->xmit_cmds[p->xmit_last]->cmd_status); sun3_82586_xmt_int()
977 printk("%s: X0: %04x N0: %04x N1: %04x %d\n",dev->name,(int)swab16(p->xmit_cmds[0]->cmd_status),(int)swab16(p->nop_cmds[0]->cmd_status),(int)swab16(p->nop_cmds[1]->cmd_status),(int)p->nop_point); sun3_82586_timeout()
993 printk("%s: command-stats: %04x %04x\n",dev->name,swab16(p->xmit_cmds[0]->cmd_status),swab16(p->xmit_cmds[1]->cmd_status)); sun3_82586_timeout()
1045 printk("%s: stat: %04x %04x\n",dev->name,p->scb->cus,swab16(p->xmit_cmds[0]->cmd_status)); sun3_82586_send_packet()
1049 p->xmit_buffs[0]->size = swab16(TBD_LAST | len); sun3_82586_send_packet()
1075 p->xmit_buffs[0]->size = swab16(TBD_LAST | len); sun3_82586_send_packet()
1086 p->xmit_buffs[p->xmit_count]->size = swab16(TBD_LAST | len); sun3_82586_send_packet()
1121 crc = swab16(p->scb->crc_errs); /* get error-statistic from the ni82586 */ sun3_82586_get_stats()
1123 aln = swab16(p->scb->aln_errs); sun3_82586_get_stats()
1125 rsc = swab16(p->scb->rsc_errs); sun3_82586_get_stats()
1127 ovrn = swab16(p->scb->ovrn_errs); sun3_82586_get_stats()
/linux-4.4.14/arch/mips/boot/
H A Delf2ecoff.c155 #define swab16(x) \ macro
169 e->e_type = swab16(e->e_type); convert_elf_hdr()
170 e->e_machine = swab16(e->e_machine); convert_elf_hdr()
176 e->e_ehsize = swab16(e->e_ehsize); convert_elf_hdr()
177 e->e_phentsize = swab16(e->e_phentsize); convert_elf_hdr()
178 e->e_phnum = swab16(e->e_phnum); convert_elf_hdr()
179 e->e_shentsize = swab16(e->e_shentsize); convert_elf_hdr()
180 e->e_shnum = swab16(e->e_shnum); convert_elf_hdr()
181 e->e_shstrndx = swab16(e->e_shstrndx); convert_elf_hdr()
221 f->f_magic = swab16(f->f_magic); convert_ecoff_filehdr()
222 f->f_nscns = swab16(f->f_nscns); convert_ecoff_filehdr()
226 f->f_opthdr = swab16(f->f_opthdr); convert_ecoff_filehdr()
227 f->f_flags = swab16(f->f_flags); convert_ecoff_filehdr()
232 a->magic = swab16(a->magic); convert_ecoff_aouthdr()
233 a->vstamp = swab16(a->vstamp); convert_ecoff_aouthdr()
260 s->s_nreloc = swab16(s->s_nreloc); convert_ecoff_esecs()
261 s->s_nlnno = swab16(s->s_nlnno); convert_ecoff_esecs()
/linux-4.4.14/drivers/net/wireless/ath/ath9k/
H A Deeprom_9287.c197 magic2 = swab16(magic); ath9k_hw_ar9287_check_eeprom()
204 temp = swab16(*eepdata); ath9k_hw_ar9287_check_eeprom()
220 el = swab16(ah->eeprom.map9287.baseEepHeader.length); ath9k_hw_ar9287_check_eeprom()
235 word = swab16(eep->baseEepHeader.length); ath9k_hw_ar9287_check_eeprom()
238 word = swab16(eep->baseEepHeader.checksum); ath9k_hw_ar9287_check_eeprom()
241 word = swab16(eep->baseEepHeader.version); ath9k_hw_ar9287_check_eeprom()
244 word = swab16(eep->baseEepHeader.regDmn[0]); ath9k_hw_ar9287_check_eeprom()
247 word = swab16(eep->baseEepHeader.regDmn[1]); ath9k_hw_ar9287_check_eeprom()
250 word = swab16(eep->baseEepHeader.rfSilent); ath9k_hw_ar9287_check_eeprom()
253 word = swab16(eep->baseEepHeader.blueToothOptions); ath9k_hw_ar9287_check_eeprom()
256 word = swab16(eep->baseEepHeader.deviceCap); ath9k_hw_ar9287_check_eeprom()
268 word = swab16(eep->modalHeader.spurChans[i].spurChan); ath9k_hw_ar9287_check_eeprom()
H A Deeprom_def.c275 if (swab16(magic) == AR5416_EEPROM_MAGIC && ath9k_hw_def_check_eeprom()
282 temp = swab16(*eepdata); ath9k_hw_def_check_eeprom()
292 el = swab16(ah->eeprom.def.baseEepHeader.length); ath9k_hw_def_check_eeprom()
313 word = swab16(eep->baseEepHeader.length); ath9k_hw_def_check_eeprom()
316 word = swab16(eep->baseEepHeader.checksum); ath9k_hw_def_check_eeprom()
319 word = swab16(eep->baseEepHeader.version); ath9k_hw_def_check_eeprom()
322 word = swab16(eep->baseEepHeader.regDmn[0]); ath9k_hw_def_check_eeprom()
325 word = swab16(eep->baseEepHeader.regDmn[1]); ath9k_hw_def_check_eeprom()
328 word = swab16(eep->baseEepHeader.rfSilent); ath9k_hw_def_check_eeprom()
331 word = swab16(eep->baseEepHeader.blueToothOptions); ath9k_hw_def_check_eeprom()
334 word = swab16(eep->baseEepHeader.deviceCap); ath9k_hw_def_check_eeprom()
348 word = swab16(pModal->xpaBiasLvlFreq[i]); ath9k_hw_def_check_eeprom()
353 word = swab16(pModal->spurChans[i].spurChan); ath9k_hw_def_check_eeprom()
H A Deeprom_4k.c204 magic2 = swab16(magic); ath9k_hw_4k_check_eeprom()
211 temp = swab16(*eepdata); ath9k_hw_4k_check_eeprom()
227 el = swab16(ah->eeprom.map4k.baseEepHeader.length); ath9k_hw_4k_check_eeprom()
248 word = swab16(eep->baseEepHeader.length); ath9k_hw_4k_check_eeprom()
251 word = swab16(eep->baseEepHeader.checksum); ath9k_hw_4k_check_eeprom()
254 word = swab16(eep->baseEepHeader.version); ath9k_hw_4k_check_eeprom()
257 word = swab16(eep->baseEepHeader.regDmn[0]); ath9k_hw_4k_check_eeprom()
260 word = swab16(eep->baseEepHeader.regDmn[1]); ath9k_hw_4k_check_eeprom()
263 word = swab16(eep->baseEepHeader.rfSilent); ath9k_hw_4k_check_eeprom()
266 word = swab16(eep->baseEepHeader.blueToothOptions); ath9k_hw_4k_check_eeprom()
269 word = swab16(eep->baseEepHeader.deviceCap); ath9k_hw_4k_check_eeprom()
281 word = swab16(eep->modalHeader.spurChans[i].spurChan); ath9k_hw_4k_check_eeprom()
/linux-4.4.14/drivers/input/touchscreen/
H A Dad7879-i2c.c38 buf[idx] = swab16(buf[idx]); ad7879_i2c_multi_read()
H A Dtsc2007.c108 val = swab16(data) >> 4; tsc2007_xfer()
/linux-4.4.14/arch/tile/lib/
H A Dchecksum.c86 result = swab16(result); do_csum()
/linux-4.4.14/drivers/staging/iio/cdc/
H A Dad7152.c272 swab16(val)); ad7152_write_raw()
286 swab16(val)); ad7152_write_raw()
368 *val = swab16(ret); ad7152_read_raw()
383 *val2 = (15625 * swab16(ret)) / 1024; ad7152_read_raw()
392 *val = swab16(ret); ad7152_read_raw()
H A Dad7746.c500 ret = i2c_smbus_write_word_data(chip->client, reg, swab16(val)); ad7746_write_raw()
512 AD7746_REG_CAP_OFFH, swab16(val)); ad7746_write_raw()
631 *val2 = (15625 * swab16(ret)) / 1024; ad7746_read_raw()
640 *val = swab16(ret); ad7746_read_raw()
H A Dad7150.c112 *val = swab16(ret); ad7150_read_raw()
119 *val = swab16(ret); ad7150_read_raw()
184 swab16(value)); ad7150_write_event_params()
/linux-4.4.14/drivers/net/wireless/cw1200/
H A Dcw1200_spi.c94 regaddr = swab16(regaddr); cw1200_spi_memcpy_fromio()
120 buf[i] = swab16(buf[i]); cw1200_spi_memcpy_fromio()
161 regaddr = swab16(regaddr); cw1200_spi_memcpy_toio()
163 buf[i] = swab16(buf[i]); cw1200_spi_memcpy_toio()
192 buf[i] = swab16(buf[i]); cw1200_spi_memcpy_toio()
/linux-4.4.14/drivers/ssb/
H A Dsprom.c30 "%04X", swab16(sprom[i]) & 0xFFFF); sprom2hex()
60 sprom[cnt++] = swab16((u16)parsed); hex2sprom()
/linux-4.4.14/drivers/net/ethernet/cirrus/
H A Dmac89x0.c143 nubus_writew(swab16(portno), dev->base_addr + ADD_PORT); readreg_io()
144 return swab16(nubus_readw(dev->base_addr + DATA_PORT)); readreg_io()
150 nubus_writew(swab16(portno), dev->base_addr + ADD_PORT); writereg_io()
151 nubus_writew(swab16(value), dev->base_addr + DATA_PORT); writereg_io()
158 return swab16(nubus_readw(dev->mem_start + portno)); readreg()
164 nubus_writew(swab16(value), dev->mem_start + portno); writereg()
229 if (sig != swab16(CHIP_EISA_ID_SIG)) mac89x0_probe()
433 while ((status = swab16(nubus_readw(dev->base_addr + ISQ_PORT)))) { net_interrupt()
/linux-4.4.14/drivers/media/i2c/
H A Duda1342.c29 i2c_smbus_write_word_data(client, reg, swab16(value)); write_reg()
H A Dvpx3220.c110 if (i2c_smbus_write_word_data(client, 0x27, swab16(fpaddr)) == -1) { vpx3220_fp_write()
119 if (i2c_smbus_write_word_data(client, 0x28, swab16(data)) == -1) { vpx3220_fp_write()
133 if (i2c_smbus_write_word_data(client, 0x26, swab16(fpaddr)) == -1) { vpx3220_fp_read()
148 return swab16(data); vpx3220_fp_read()
/linux-4.4.14/sound/pcmcia/pdaudiocf/
H A Dpdaudiocf_irq.c98 *dst++ = swab16(inw(rdp_port) ^ xor); pdacf_transfer_mono16sw()
118 *dst++ = swab16(inw(rdp_port) ^ xor); pdacf_transfer_stereo16sw()
119 *dst++ = swab16(inw(rdp_port) ^ xor); pdacf_transfer_stereo16sw()
/linux-4.4.14/arch/parisc/lib/
H A Dchecksum.c94 result = swab16(result); do_csum()
/linux-4.4.14/lib/
H A Diomap.c62 #define pio_read16be(port) swab16(inw(port))
103 #define pio_write16be(val,port) outw(swab16(val),port)
/linux-4.4.14/arch/arm/vdso/
H A Dvdsomunge.c61 #define swab16(x) \ macro
121 return swap ? swab16(half) : half; read_elf_half()
/linux-4.4.14/sound/core/oss/
H A Dmulaw.c161 sample = swab16(sample); cvt_s16_to_native()
209 sample = swab16(sample); cvt_native_to_s16()
/linux-4.4.14/arch/powerpc/kernel/
H A Dalign.c599 data.h[0] = swab16(data.h[0]); emulate_spe()
600 data.h[1] = swab16(data.h[1]); emulate_spe()
601 data.h[2] = swab16(data.h[2]); emulate_spe()
602 data.h[3] = swab16(data.h[3]); emulate_spe()
980 data.x16.low16 = swab16(data.x16.low16); fix_alignment()
/linux-4.4.14/drivers/media/i2c/soc_camera/
H A Dmt9t112.c154 command = swab16(command); __mt9t112_reg_read()
176 return swab16(ret); __mt9t112_reg_read()
186 command = swab16(command); __mt9t112_reg_write()
187 data = swab16(data); __mt9t112_reg_write()
H A Dov9740.c418 reg = swab16(reg); ov9740_reg_read()
439 reg = swab16(reg); ov9740_reg_write()
/linux-4.4.14/arch/powerpc/platforms/44x/
H A Dwarp.c263 s16 temp = swab16(val); pika_dtm_thread()
/linux-4.4.14/arch/arm/include/asm/
H A Dopcodes.h92 #define ___opcode_swab16(x) swab16(x)
/linux-4.4.14/sound/isa/sb/
H A Demu8000_patch.c98 c = swab16(cc); read_word()
/linux-4.4.14/drivers/mfd/
H A Drtsx_usb.c186 value = swab16(addr); rtsx_usb_ep0_write_register()
210 value = swab16(addr); rtsx_usb_ep0_read_register()
/linux-4.4.14/arch/sparc/kernel/
H A Dunaligned_64.c221 src_val = swab16(src_val); do_int_store()
361 val_in = swab16(val_in); kernel_unaligned_trap()
/linux-4.4.14/drivers/mtd/nand/
H A Ddenali.h181 #define MAKE_COMPARABLE_REVISION(x) swab16((x) & REVISION__VALUE)
/linux-4.4.14/drivers/net/ethernet/dec/tulip/
H A Deeprom.c380 return (tp->flags & HAS_SWAPPED_SEEPROM) ? swab16(retval) : retval; tulip_read_eeprom()
/linux-4.4.14/drivers/power/
H A Dds2782_battery.c98 *val = swab16(ret); ds278x_read_reg16()
/linux-4.4.14/net/mac80211/
H A Dtkip.c66 return tkip_sbox[val & 0xff] ^ swab16(tkip_sbox[val >> 8]); tkipS()
/linux-4.4.14/drivers/net/ethernet/tehuti/
H A Dtehuti.h92 # define CPU_CHIP_SWAP16(x) swab16(x)
/linux-4.4.14/drivers/net/ethernet/atheros/atl1e/
H A Datl1e_hw.c100 *(u16 *) &eth_addr[0] = swab16(*(u16 *)&addr[1]); atl1e_get_permanent_address()
/linux-4.4.14/drivers/infiniband/hw/nes/
H A Dnes_mgt.c671 nes_quad.TcpPorts[0] = swab16(nesqp->nesqp_context->tcpPorts[1]); nes_chg_qh_handler()
672 nes_quad.TcpPorts[1] = swab16(nesqp->nesqp_context->tcpPorts[0]); nes_chg_qh_handler()
/linux-4.4.14/arch/powerpc/kvm/
H A Dpowerpc.c741 case 2: gpr = swab16(*(u16 *)run->mmio.data); break; kvmppc_complete_mmio_load()
881 case 2: *(u16 *)data = swab16(val); break; kvmppc_handle_store()
/linux-4.4.14/drivers/net/ethernet/8390/
H A Dmac8390.c727 hdr->count = swab16(hdr->count); sane_get_8390_hdr()
/linux-4.4.14/drivers/misc/
H A Dad525x_dpot.c217 value = swab16(value); dpot_read_i2c()
/linux-4.4.14/drivers/usb/serial/
H A Dio_ti.c355 be_start_address = swab16((u16)start_address); read_download_mem()
473 be_start_address = swab16((u16)start_address); write_i2c_mem()
506 be_start_address = swab16((u16)start_address); write_i2c_mem()
/linux-4.4.14/drivers/net/wireless/
H A Dray_cs.c1697 local->stats.rx_over_errors += swab16(readw(&p->mrx_overflow)); ray_get_stats()
1703 swab16(readw(&p->mrx_checksum_error)); ray_get_stats()
1708 local->stats.rx_frame_errors += swab16(readw(&p->rx_hec_error)); ray_get_stats()
/linux-4.4.14/drivers/net/ethernet/atheros/atlx/
H A Datl1.c474 *(u16 *) &eth_addr[0] = swab16(*(u16 *) &addr[1]); atl1_get_permanent_address()
507 *(u16 *) &eth_addr[0] = swab16(*(u16 *) &addr[1]); atl1_get_permanent_address()
522 *(u16 *) &eth_addr[0] = swab16(*(u16 *) &addr[1]); atl1_get_permanent_address()
/linux-4.4.14/drivers/net/ethernet/realtek/
H A D8139cp.c429 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff)); cp_rx_skb()
714 TxVlanTag | swab16(skb_vlan_tag_get(skb)) : 0x00; cp_tx_vlan_tag()
H A Dr8169.c2089 TxVlanTag | swab16(skb_vlan_tag_get(skb)) : 0x00; rtl8169_tx_vlan_tag()
2097 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff)); rtl8169_rx_vlan_tag()
/linux-4.4.14/sound/pci/ice1712/
H A Dice1724.c2330 ((unsigned int)swab16(vendor) << 16) | swab16(device); snd_vt1724_read_eeprom()
H A Dice1712.c2305 ice->eeprom.subvendor = ((unsigned int)swab16(vendor) << 16) | swab16(device); snd_ice1712_read_eeprom()
/linux-4.4.14/drivers/media/pci/ttpci/
H A Dav7110_hw.c799 swab16(*(u16 *)(buf + 2 * i)), 2); WriteText()
/linux-4.4.14/drivers/net/hamradio/
H A Dmkiss.c498 crc = swab16(crc16(0, p, len)); ax_encaps()
/linux-4.4.14/arch/tile/kernel/
H A Dunaligned.c951 b = swab16(x); jit_bundle_gen()
/linux-4.4.14/drivers/net/usb/
H A Dr8152.c1449 opts2 = TX_VLAN_TAG | swab16(skb_vlan_tag_get(skb)); rtl_tx_vlan_tag()
1460 swab16(opts2 & 0xffff)); rtl_rx_vlan_tag()
/linux-4.4.14/sound/oss/
H A Dswarm_cs4297a.c1863 left = swab16(left); cs4297a_write()
1864 right = swab16(right); cs4297a_write()
/linux-4.4.14/drivers/net/ethernet/marvell/
H A Dmvpp2.c1683 match = mvpp2_prs_tcam_data_cmp(pe, 0, swab16(tpid)); mvpp2_prs_vlan_find()
1826 match = mvpp2_prs_tcam_data_cmp(pe, 0, swab16(tpid1)) mvpp2_prs_double_vlan_find()
1827 && mvpp2_prs_tcam_data_cmp(pe, 4, swab16(tpid2)); mvpp2_prs_double_vlan_find()
4274 if (l3_proto == swab16(ETH_P_IP)) { mvpp2_txq_desc_csum()
/linux-4.4.14/drivers/scsi/qla2xxx/
H A Dqla_dbg.c448 ram[cnt + idx] = swab16(dump[idx]); qla2xxx_dump_ram()
H A Dqla_init.c5582 wcode[i] = swab16(fwcode[i]); qla2x00_load_risc()
H A Dqla_target.c4939 ctio24->u.status1.ox_id = swab16(atio->u.isp24.fcp_hdr.ox_id); __qlt_send_busy()
/linux-4.4.14/drivers/net/ethernet/via/
H A Dvia-velocity.c2081 u16 vid = swab16(le16_to_cpu(rd->rdesc1.PQTAG)); velocity_receive_frame()
/linux-4.4.14/drivers/net/ethernet/emulex/benet/
H A Dbe_cmds.c4048 port_desc.nv_port = swab16(port); be_cmd_set_vxlan_port()
H A Dbe_main.c2271 rxcp->vlan_tag = swab16(rxcp->vlan_tag); be_rx_compl_get()
/linux-4.4.14/arch/x86/kernel/
H A Dapm_32.c1050 *life = swab16((u16)call.edx); apm_get_power_status()
/linux-4.4.14/drivers/net/wireless/rt2x00/
H A Drt2800lib.c566 * will be swapped, use swab16 to convert the crc to the correct rt2800_check_firmware_crc()
569 crc = swab16(crc); rt2800_check_firmware_crc()
/linux-4.4.14/drivers/net/ethernet/broadcom/bnx2x/
H A Dbnx2x_cmn.c3370 #define bswab16(b16) ((__force __le16) swab16((__force __u16) (b16))) bnx2x_csum_fix()
/linux-4.4.14/drivers/net/ethernet/broadcom/
H A Dcnic.c2072 swab16(~csum_ipv6_magic(&src_ip, &dst_ip, 0, IPPROTO_TCP, 0)); cnic_init_storm_conn_bufs()
H A Dtg3.c14322 tp->nvram_size = swab16((u16)(val & 0x0000ffff)) * 1024; tg3_get_nvram_size()
/linux-4.4.14/arch/x86/kvm/
H A Demulate.c3501 ctxt->dst.val |= (unsigned long)swab16(tmp); em_movbe()

Completed in 3157 milliseconds