ai 107 arch/ia64/mm/contig.c struct pcpu_alloc_info *ai; ai 112 arch/ia64/mm/contig.c ai = pcpu_alloc_alloc_info(1, num_possible_cpus()); ai 113 arch/ia64/mm/contig.c if (!ai) ai 115 arch/ia64/mm/contig.c gi = &ai->groups[0]; ai 129 arch/ia64/mm/contig.c ai->static_size = static_size; ai 130 arch/ia64/mm/contig.c ai->reserved_size = reserved_size; ai 131 arch/ia64/mm/contig.c ai->dyn_size = dyn_size; ai 132 arch/ia64/mm/contig.c ai->unit_size = PERCPU_PAGE_SIZE; ai 133 arch/ia64/mm/contig.c ai->atom_size = PAGE_SIZE; ai 134 arch/ia64/mm/contig.c ai->alloc_size = PERCPU_PAGE_SIZE; ai 136 arch/ia64/mm/contig.c pcpu_setup_first_chunk(ai, __per_cpu_start + __per_cpu_offset[0]); ai 137 arch/ia64/mm/contig.c pcpu_free_alloc_info(ai); ai 182 arch/ia64/mm/discontig.c struct pcpu_alloc_info *ai; ai 191 arch/ia64/mm/discontig.c ai = pcpu_alloc_alloc_info(MAX_NUMNODES, nr_cpu_ids); ai 192 arch/ia64/mm/discontig.c if (!ai) ai 194 arch/ia64/mm/discontig.c cpu_map = ai->groups[0].cpu_map; ai 219 arch/ia64/mm/discontig.c ai->static_size = static_size; ai 220 arch/ia64/mm/discontig.c ai->reserved_size = reserved_size; ai 221 arch/ia64/mm/discontig.c ai->dyn_size = dyn_size; ai 222 arch/ia64/mm/discontig.c ai->unit_size = PERCPU_PAGE_SIZE; ai 223 arch/ia64/mm/discontig.c ai->atom_size = PAGE_SIZE; ai 224 arch/ia64/mm/discontig.c ai->alloc_size = PERCPU_PAGE_SIZE; ai 231 arch/ia64/mm/discontig.c ai->nr_groups = 0; ai 242 arch/ia64/mm/discontig.c gi = &ai->groups[ai->nr_groups++]; ai 248 arch/ia64/mm/discontig.c pcpu_setup_first_chunk(ai, base); ai 249 arch/ia64/mm/discontig.c pcpu_free_alloc_info(ai); ai 101 arch/s390/kernel/cache.c static inline unsigned long ecag(int ai, int li, int ti) ai 103 arch/s390/kernel/cache.c return __ecag(ECAG_CACHE_ATTRIBUTE, ai << 4 | li << 1 | ti); ai 201 arch/s390/pci/pci_irq.c unsigned long si, ai; ai 222 arch/s390/pci/pci_irq.c for (ai = 0;;) { ai 223 arch/s390/pci/pci_irq.c ai = airq_iv_scan(aibv, ai, airq_iv_end(aibv)); ai 224 arch/s390/pci/pci_irq.c if (ai == -1UL) ai 227 arch/s390/pci/pci_irq.c airq_iv_lock(aibv, ai); ai 228 arch/s390/pci/pci_irq.c generic_handle_irq(airq_iv_get_data(aibv, ai)); ai 229 arch/s390/pci/pci_irq.c airq_iv_unlock(aibv, ai); ai 1644 drivers/cdrom/cdrom.c static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai) ai 1655 drivers/cdrom/cdrom.c switch (ai->type) { ai 1660 drivers/cdrom/cdrom.c setup_report_key(&cgc, ai->lsa.agid, 0); ai 1665 drivers/cdrom/cdrom.c ai->lsa.agid = buf[7] >> 6; ai 1671 drivers/cdrom/cdrom.c setup_report_key(&cgc, ai->lsk.agid, 2); ai 1676 drivers/cdrom/cdrom.c copy_key(ai->lsk.key, &buf[4]); ai 1682 drivers/cdrom/cdrom.c setup_report_key(&cgc, ai->lsc.agid, 1); ai 1687 drivers/cdrom/cdrom.c copy_chal(ai->lsc.chal, &buf[4]); ai 1695 drivers/cdrom/cdrom.c setup_report_key(&cgc, ai->lstk.agid, 4); ai 1696 drivers/cdrom/cdrom.c cgc.cmd[5] = ai->lstk.lba; ai 1697 drivers/cdrom/cdrom.c cgc.cmd[4] = ai->lstk.lba >> 8; ai 1698 drivers/cdrom/cdrom.c cgc.cmd[3] = ai->lstk.lba >> 16; ai 1699 drivers/cdrom/cdrom.c cgc.cmd[2] = ai->lstk.lba >> 24; ai 1704 drivers/cdrom/cdrom.c ai->lstk.cpm = (buf[4] >> 7) & 1; ai 1705 drivers/cdrom/cdrom.c ai->lstk.cp_sec = (buf[4] >> 6) & 1; ai 1706 drivers/cdrom/cdrom.c ai->lstk.cgms = (buf[4] >> 4) & 3; ai 1707 drivers/cdrom/cdrom.c copy_key(ai->lstk.title_key, &buf[5]); ai 1713 drivers/cdrom/cdrom.c setup_report_key(&cgc, ai->lsasf.agid, 5); ai 1718 drivers/cdrom/cdrom.c ai->lsasf.asf = buf[7] & 1; ai 1724 drivers/cdrom/cdrom.c setup_send_key(&cgc, ai->hsc.agid, 1); ai 1726 drivers/cdrom/cdrom.c copy_chal(&buf[4], ai->hsc.chal); ai 1731 drivers/cdrom/cdrom.c ai->type = DVD_LU_SEND_KEY1; ai 1736 drivers/cdrom/cdrom.c setup_send_key(&cgc, ai->hsk.agid, 3); ai 1738 drivers/cdrom/cdrom.c copy_key(&buf[4], ai->hsk.key); ai 1741 drivers/cdrom/cdrom.c ai->type = DVD_AUTH_FAILURE; ai 1744 drivers/cdrom/cdrom.c ai->type = DVD_AUTH_ESTABLISHED; ai 1751 drivers/cdrom/cdrom.c setup_report_key(&cgc, ai->lsa.agid, 0x3f); ai 1766 drivers/cdrom/cdrom.c ai->lrpcs.type = rpc_state.type_code; ai 1767 drivers/cdrom/cdrom.c ai->lrpcs.vra = rpc_state.vra; ai 1768 drivers/cdrom/cdrom.c ai->lrpcs.ucca = rpc_state.ucca; ai 1769 drivers/cdrom/cdrom.c ai->lrpcs.region_mask = rpc_state.region_mask; ai 1770 drivers/cdrom/cdrom.c ai->lrpcs.rpc_scheme = rpc_state.rpc_scheme; ai 1778 drivers/cdrom/cdrom.c buf[4] = ai->hrpcs.pdrc; ai 1785 drivers/cdrom/cdrom.c cd_dbg(CD_WARNING, "Invalid DVD key ioctl (%d)\n", ai->type); ai 3237 drivers/cdrom/cdrom.c dvd_authinfo ai; ai 3241 drivers/cdrom/cdrom.c if (copy_from_user(&ai, (dvd_authinfo __user *)arg, sizeof(ai))) ai 3243 drivers/cdrom/cdrom.c ret = dvd_do_auth(cdi, &ai); ai 3246 drivers/cdrom/cdrom.c if (copy_to_user((dvd_authinfo __user *)arg, &ai, sizeof(ai))) ai 141 drivers/clk/ti/dpll3xxx.c u8 ai; ai 155 drivers/clk/ti/dpll3xxx.c ai = omap3_dpll_autoidle_read(clk); ai 157 drivers/clk/ti/dpll3xxx.c if (ai) ai 164 drivers/clk/ti/dpll3xxx.c if (ai) ai 187 drivers/clk/ti/dpll3xxx.c u8 ai; ai 195 drivers/clk/ti/dpll3xxx.c ai = omap3_dpll_autoidle_read(clk); ai 201 drivers/clk/ti/dpll3xxx.c if (ai) ai 218 drivers/clk/ti/dpll3xxx.c u8 ai; ai 225 drivers/clk/ti/dpll3xxx.c ai = omap3_dpll_autoidle_read(clk); ai 229 drivers/clk/ti/dpll3xxx.c if (ai) ai 305 drivers/clk/ti/dpll3xxx.c u8 dco, sd_div, ai = 0; ai 361 drivers/clk/ti/dpll3xxx.c ai = omap3_dpll_autoidle_read(clk); ai 362 drivers/clk/ti/dpll3xxx.c if (ai) { ai 399 drivers/clk/ti/dpll3xxx.c if (errata_i810 && ai) ai 297 drivers/crypto/caam/regs.h u32 ai; /* AI_VERSION */ ai 4277 drivers/crypto/chelsio/chcr_algo.c struct crypto_alg ai; ai 4340 drivers/crypto/chelsio/chcr_algo.c ai = driver_algs[i].alg.hash.halg.base; ai 4341 drivers/crypto/chelsio/chcr_algo.c name = ai.cra_driver_name; ai 48 drivers/media/pci/ttpci/av7110_ipack.c struct dvb_audio_info ai; ai 65 drivers/media/pci/ttpci/av7110_ipack.c ai.off = 0; ai 70 drivers/media/pci/ttpci/av7110_ipack.c p->count - ac3_off, &ai, 0); ai 73 drivers/media/pci/ttpci/av7110_ipack.c ai.framesize + 1; ai 77 drivers/media/pci/ttpci/av7110_ipack.c ac3_off += nframes * ai.framesize - p->count; ai 21 drivers/media/pci/ttpci/dvb_filter.c int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int pr) ai 43 drivers/media/pci/ttpci/dvb_filter.c ai->off = c; ai 46 drivers/media/pci/ttpci/dvb_filter.c ai->layer = 0; // 0 for AC3 ai 50 drivers/media/pci/ttpci/dvb_filter.c ai->bit_rate = ac3_bitrates[frame >> 1]*1000; ai 53 drivers/media/pci/ttpci/dvb_filter.c printk(KERN_CONT " BRate: %d kb/s", (int) ai->bit_rate/1000); ai 55 drivers/media/pci/ttpci/dvb_filter.c ai->frequency = (headr[2] & 0xc0 ) >> 6; ai 57 drivers/media/pci/ttpci/dvb_filter.c ai->frequency = freq[fr]*100; ai 59 drivers/media/pci/ttpci/dvb_filter.c printk(KERN_CONT " Freq: %d Hz\n", (int) ai->frequency); ai 61 drivers/media/pci/ttpci/dvb_filter.c ai->framesize = ac3_frames[fr][frame >> 1]; ai 62 drivers/media/pci/ttpci/dvb_filter.c if ((frame & 1) && (fr == 1)) ai->framesize++; ai 63 drivers/media/pci/ttpci/dvb_filter.c ai->framesize = ai->framesize << 1; ai 65 drivers/media/pci/ttpci/dvb_filter.c printk(KERN_DEBUG " Framesize %d\n", (int) ai->framesize); ai 239 drivers/media/pci/ttpci/dvb_filter.h int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int pr); ai 229 drivers/misc/cxl/flash.c struct cxl_adapter_image *ai) ai 238 drivers/misc/cxl/flash.c need_header = (ai->flags & CXL_AI_NEED_HEADER); ai 249 drivers/misc/cxl/flash.c header->image_length = cpu_to_be64(ai->len_image); ai 253 drivers/misc/cxl/flash.c len_chunk = ai->len_data; ai 279 drivers/misc/cxl/flash.c from = (void *) ai->data; ai 323 drivers/misc/cxl/flash.c struct cxl_adapter_image *ai) ai 331 drivers/misc/cxl/flash.c &cxl_h_download_adapter_image, ai); ai 340 drivers/misc/cxl/flash.c &cxl_h_validate_adapter_image, ai); ai 374 drivers/misc/cxl/flash.c struct cxl_adapter_image ai; ai 378 drivers/misc/cxl/flash.c if (copy_from_user(&ai, uai, sizeof(struct cxl_adapter_image))) ai 384 drivers/misc/cxl/flash.c if (ai.reserved1 || ai.reserved2 || ai.reserved3 || ai.reserved4 || ai 385 drivers/misc/cxl/flash.c (ai.flags & ~CXL_AI_ALL)) ai 388 drivers/misc/cxl/flash.c return transfer_image(adapter, operation, &ai); ai 79 drivers/mtd/ubi/attach.c static int self_check_ai(struct ubi_device *ubi, struct ubi_attach_info *ai); ai 103 drivers/mtd/ubi/attach.c static struct ubi_ainf_volume *find_or_add_av(struct ubi_attach_info *ai, ai 108 drivers/mtd/ubi/attach.c struct rb_node **p = &ai->volumes.rb_node, *parent = NULL; ai 140 drivers/mtd/ubi/attach.c if (vol_id > ai->highest_vol_id) ai 141 drivers/mtd/ubi/attach.c ai->highest_vol_id = vol_id; ai 144 drivers/mtd/ubi/attach.c rb_insert_color(&av->rb, &ai->volumes); ai 145 drivers/mtd/ubi/attach.c ai->vols_found += 1; ai 161 drivers/mtd/ubi/attach.c static struct ubi_ainf_volume *ubi_find_or_add_av(struct ubi_attach_info *ai, ai 164 drivers/mtd/ubi/attach.c return find_or_add_av(ai, vol_id, AV_FIND_OR_ADD, created); ai 178 drivers/mtd/ubi/attach.c struct ubi_ainf_peb *ubi_alloc_aeb(struct ubi_attach_info *ai, int pnum, ai 183 drivers/mtd/ubi/attach.c aeb = kmem_cache_zalloc(ai->aeb_slab_cache, GFP_KERNEL); ai 203 drivers/mtd/ubi/attach.c void ubi_free_aeb(struct ubi_attach_info *ai, struct ubi_ainf_peb *aeb) ai 205 drivers/mtd/ubi/attach.c kmem_cache_free(ai->aeb_slab_cache, aeb); ai 229 drivers/mtd/ubi/attach.c static int add_to_list(struct ubi_attach_info *ai, int pnum, int vol_id, ai 234 drivers/mtd/ubi/attach.c if (list == &ai->free) { ai 236 drivers/mtd/ubi/attach.c } else if (list == &ai->erase) { ai 238 drivers/mtd/ubi/attach.c } else if (list == &ai->alien) { ai 240 drivers/mtd/ubi/attach.c ai->alien_peb_count += 1; ai 244 drivers/mtd/ubi/attach.c aeb = ubi_alloc_aeb(ai, pnum, ec); ai 268 drivers/mtd/ubi/attach.c static int add_corrupted(struct ubi_attach_info *ai, int pnum, int ec) ai 274 drivers/mtd/ubi/attach.c aeb = ubi_alloc_aeb(ai, pnum, ec); ai 278 drivers/mtd/ubi/attach.c ai->corr_peb_count += 1; ai 279 drivers/mtd/ubi/attach.c list_add(&aeb->u.list, &ai->corr); ai 296 drivers/mtd/ubi/attach.c static int add_fastmap(struct ubi_attach_info *ai, int pnum, ai 301 drivers/mtd/ubi/attach.c aeb = ubi_alloc_aeb(ai, pnum, ec); ai 307 drivers/mtd/ubi/attach.c list_add(&aeb->u.list, &ai->fastmap); ai 396 drivers/mtd/ubi/attach.c static struct ubi_ainf_volume *add_volume(struct ubi_attach_info *ai, ai 405 drivers/mtd/ubi/attach.c av = ubi_find_or_add_av(ai, vol_id, &created); ai 563 drivers/mtd/ubi/attach.c int ubi_add_to_av(struct ubi_device *ubi, struct ubi_attach_info *ai, int pnum, ai 579 drivers/mtd/ubi/attach.c av = add_volume(ai, vol_id, pnum, vid_hdr); ai 583 drivers/mtd/ubi/attach.c if (ai->max_sqnum < sqnum) ai 584 drivers/mtd/ubi/attach.c ai->max_sqnum = sqnum; ai 650 drivers/mtd/ubi/attach.c err = add_to_list(ai, aeb->pnum, aeb->vol_id, ai 652 drivers/mtd/ubi/attach.c &ai->erase); ai 674 drivers/mtd/ubi/attach.c return add_to_list(ai, pnum, vol_id, lnum, ec, ai 675 drivers/mtd/ubi/attach.c cmp_res & 4, &ai->erase); ai 688 drivers/mtd/ubi/attach.c aeb = ubi_alloc_aeb(ai, pnum, ec); ai 717 drivers/mtd/ubi/attach.c struct ubi_ainf_volume *ubi_add_av(struct ubi_attach_info *ai, int vol_id) ai 721 drivers/mtd/ubi/attach.c return find_or_add_av(ai, vol_id, AV_ADD, &created); ai 732 drivers/mtd/ubi/attach.c struct ubi_ainf_volume *ubi_find_av(const struct ubi_attach_info *ai, ai 737 drivers/mtd/ubi/attach.c return find_or_add_av((struct ubi_attach_info *)ai, vol_id, AV_FIND, ai 741 drivers/mtd/ubi/attach.c static void destroy_av(struct ubi_attach_info *ai, struct ubi_ainf_volume *av, ai 749 drivers/mtd/ubi/attach.c void ubi_remove_av(struct ubi_attach_info *ai, struct ubi_ainf_volume *av) ai 753 drivers/mtd/ubi/attach.c rb_erase(&av->rb, &ai->volumes); ai 754 drivers/mtd/ubi/attach.c destroy_av(ai, av, &ai->erase); ai 755 drivers/mtd/ubi/attach.c ai->vols_found -= 1; ai 772 drivers/mtd/ubi/attach.c const struct ubi_attach_info *ai, int pnum, int ec) ai 819 drivers/mtd/ubi/attach.c struct ubi_attach_info *ai) ai 824 drivers/mtd/ubi/attach.c if (!list_empty(&ai->free)) { ai 825 drivers/mtd/ubi/attach.c aeb = list_entry(ai->free.next, struct ubi_ainf_peb, u.list); ai 837 drivers/mtd/ubi/attach.c list_for_each_entry_safe(aeb, tmp_aeb, &ai->erase, u.list) { ai 839 drivers/mtd/ubi/attach.c aeb->ec = ai->mean_ec; ai 841 drivers/mtd/ubi/attach.c err = early_erase_peb(ubi, ai, aeb->pnum, aeb->ec+1); ai 941 drivers/mtd/ubi/attach.c static int scan_peb(struct ubi_device *ubi, struct ubi_attach_info *ai, ai 944 drivers/mtd/ubi/attach.c struct ubi_ec_hdr *ech = ai->ech; ai 945 drivers/mtd/ubi/attach.c struct ubi_vid_io_buf *vidb = ai->vidb; ai 957 drivers/mtd/ubi/attach.c ai->bad_peb_count += 1; ai 971 drivers/mtd/ubi/attach.c ai->empty_peb_count += 1; ai 972 drivers/mtd/ubi/attach.c return add_to_list(ai, pnum, UBI_UNKNOWN, UBI_UNKNOWN, ai 973 drivers/mtd/ubi/attach.c UBI_UNKNOWN, 0, &ai->erase); ai 975 drivers/mtd/ubi/attach.c ai->empty_peb_count += 1; ai 976 drivers/mtd/ubi/attach.c return add_to_list(ai, pnum, UBI_UNKNOWN, UBI_UNKNOWN, ai 977 drivers/mtd/ubi/attach.c UBI_UNKNOWN, 1, &ai->erase); ai 1061 drivers/mtd/ubi/attach.c ai->maybe_bad_peb_count += 1; ai 1076 drivers/mtd/ubi/attach.c ai->force_full_scan = 1; ai 1103 drivers/mtd/ubi/attach.c err = add_to_list(ai, pnum, UBI_UNKNOWN, ai 1104 drivers/mtd/ubi/attach.c UBI_UNKNOWN, ec, 1, &ai->erase); ai 1107 drivers/mtd/ubi/attach.c err = add_corrupted(ai, pnum, ec); ai 1112 drivers/mtd/ubi/attach.c err = add_to_list(ai, pnum, UBI_UNKNOWN, UBI_UNKNOWN, ai 1113 drivers/mtd/ubi/attach.c ec, 1, &ai->erase); ai 1119 drivers/mtd/ubi/attach.c err = add_to_list(ai, pnum, UBI_UNKNOWN, ai 1120 drivers/mtd/ubi/attach.c UBI_UNKNOWN, ec, 1, &ai->erase); ai 1122 drivers/mtd/ubi/attach.c err = add_to_list(ai, pnum, UBI_UNKNOWN, ai 1123 drivers/mtd/ubi/attach.c UBI_UNKNOWN, ec, 0, &ai->free); ai 1143 drivers/mtd/ubi/attach.c err = add_to_list(ai, pnum, vol_id, lnum, ai 1144 drivers/mtd/ubi/attach.c ec, 1, &ai->erase); ai 1158 drivers/mtd/ubi/attach.c err = add_to_list(ai, pnum, vol_id, lnum, ai 1159 drivers/mtd/ubi/attach.c ec, 0, &ai->alien); ai 1176 drivers/mtd/ubi/attach.c err = add_fastmap(ai, pnum, vidh, ec); ai 1178 drivers/mtd/ubi/attach.c err = ubi_add_to_av(ubi, ai, pnum, ec, vidh, bitflips); ai 1185 drivers/mtd/ubi/attach.c ai->ec_sum += ec; ai 1186 drivers/mtd/ubi/attach.c ai->ec_count += 1; ai 1187 drivers/mtd/ubi/attach.c if (ec > ai->max_ec) ai 1188 drivers/mtd/ubi/attach.c ai->max_ec = ec; ai 1189 drivers/mtd/ubi/attach.c if (ec < ai->min_ec) ai 1190 drivers/mtd/ubi/attach.c ai->min_ec = ec; ai 1207 drivers/mtd/ubi/attach.c static int late_analysis(struct ubi_device *ubi, struct ubi_attach_info *ai) ai 1212 drivers/mtd/ubi/attach.c peb_count = ubi->peb_count - ai->bad_peb_count - ai->alien_peb_count; ai 1220 drivers/mtd/ubi/attach.c if (ai->corr_peb_count) { ai 1222 drivers/mtd/ubi/attach.c ai->corr_peb_count); ai 1224 drivers/mtd/ubi/attach.c list_for_each_entry(aeb, &ai->corr, u.list) ai 1232 drivers/mtd/ubi/attach.c if (ai->corr_peb_count >= max_corr) { ai 1238 drivers/mtd/ubi/attach.c if (ai->empty_peb_count + ai->maybe_bad_peb_count == peb_count) { ai 1254 drivers/mtd/ubi/attach.c if (ai->maybe_bad_peb_count <= 2) { ai 1255 drivers/mtd/ubi/attach.c ai->is_empty = 1; ai 1277 drivers/mtd/ubi/attach.c static void destroy_av(struct ubi_attach_info *ai, struct ubi_ainf_volume *av, ai 1301 drivers/mtd/ubi/attach.c ubi_free_aeb(ai, aeb); ai 1311 drivers/mtd/ubi/attach.c static void destroy_ai(struct ubi_attach_info *ai) ai 1317 drivers/mtd/ubi/attach.c list_for_each_entry_safe(aeb, aeb_tmp, &ai->alien, u.list) { ai 1319 drivers/mtd/ubi/attach.c ubi_free_aeb(ai, aeb); ai 1321 drivers/mtd/ubi/attach.c list_for_each_entry_safe(aeb, aeb_tmp, &ai->erase, u.list) { ai 1323 drivers/mtd/ubi/attach.c ubi_free_aeb(ai, aeb); ai 1325 drivers/mtd/ubi/attach.c list_for_each_entry_safe(aeb, aeb_tmp, &ai->corr, u.list) { ai 1327 drivers/mtd/ubi/attach.c ubi_free_aeb(ai, aeb); ai 1329 drivers/mtd/ubi/attach.c list_for_each_entry_safe(aeb, aeb_tmp, &ai->free, u.list) { ai 1331 drivers/mtd/ubi/attach.c ubi_free_aeb(ai, aeb); ai 1333 drivers/mtd/ubi/attach.c list_for_each_entry_safe(aeb, aeb_tmp, &ai->fastmap, u.list) { ai 1335 drivers/mtd/ubi/attach.c ubi_free_aeb(ai, aeb); ai 1339 drivers/mtd/ubi/attach.c rb = ai->volumes.rb_node; ai 1356 drivers/mtd/ubi/attach.c destroy_av(ai, av, NULL); ai 1360 drivers/mtd/ubi/attach.c kmem_cache_destroy(ai->aeb_slab_cache); ai 1361 drivers/mtd/ubi/attach.c kfree(ai); ai 1374 drivers/mtd/ubi/attach.c static int scan_all(struct ubi_device *ubi, struct ubi_attach_info *ai, ai 1384 drivers/mtd/ubi/attach.c ai->ech = kzalloc(ubi->ec_hdr_alsize, GFP_KERNEL); ai 1385 drivers/mtd/ubi/attach.c if (!ai->ech) ai 1388 drivers/mtd/ubi/attach.c ai->vidb = ubi_alloc_vid_buf(ubi, GFP_KERNEL); ai 1389 drivers/mtd/ubi/attach.c if (!ai->vidb) ai 1396 drivers/mtd/ubi/attach.c err = scan_peb(ubi, ai, pnum, false); ai 1404 drivers/mtd/ubi/attach.c if (ai->ec_count) ai 1405 drivers/mtd/ubi/attach.c ai->mean_ec = div_u64(ai->ec_sum, ai->ec_count); ai 1407 drivers/mtd/ubi/attach.c err = late_analysis(ubi, ai); ai 1415 drivers/mtd/ubi/attach.c ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) { ai 1418 drivers/mtd/ubi/attach.c aeb->ec = ai->mean_ec; ai 1421 drivers/mtd/ubi/attach.c list_for_each_entry(aeb, &ai->free, u.list) { ai 1423 drivers/mtd/ubi/attach.c aeb->ec = ai->mean_ec; ai 1426 drivers/mtd/ubi/attach.c list_for_each_entry(aeb, &ai->corr, u.list) ai 1428 drivers/mtd/ubi/attach.c aeb->ec = ai->mean_ec; ai 1430 drivers/mtd/ubi/attach.c list_for_each_entry(aeb, &ai->erase, u.list) ai 1432 drivers/mtd/ubi/attach.c aeb->ec = ai->mean_ec; ai 1434 drivers/mtd/ubi/attach.c err = self_check_ai(ubi, ai); ai 1438 drivers/mtd/ubi/attach.c ubi_free_vid_buf(ai->vidb); ai 1439 drivers/mtd/ubi/attach.c kfree(ai->ech); ai 1444 drivers/mtd/ubi/attach.c ubi_free_vid_buf(ai->vidb); ai 1446 drivers/mtd/ubi/attach.c kfree(ai->ech); ai 1452 drivers/mtd/ubi/attach.c struct ubi_attach_info *ai; ai 1454 drivers/mtd/ubi/attach.c ai = kzalloc(sizeof(struct ubi_attach_info), GFP_KERNEL); ai 1455 drivers/mtd/ubi/attach.c if (!ai) ai 1456 drivers/mtd/ubi/attach.c return ai; ai 1458 drivers/mtd/ubi/attach.c INIT_LIST_HEAD(&ai->corr); ai 1459 drivers/mtd/ubi/attach.c INIT_LIST_HEAD(&ai->free); ai 1460 drivers/mtd/ubi/attach.c INIT_LIST_HEAD(&ai->erase); ai 1461 drivers/mtd/ubi/attach.c INIT_LIST_HEAD(&ai->alien); ai 1462 drivers/mtd/ubi/attach.c INIT_LIST_HEAD(&ai->fastmap); ai 1463 drivers/mtd/ubi/attach.c ai->volumes = RB_ROOT; ai 1464 drivers/mtd/ubi/attach.c ai->aeb_slab_cache = kmem_cache_create("ubi_aeb_slab_cache", ai 1467 drivers/mtd/ubi/attach.c if (!ai->aeb_slab_cache) { ai 1468 drivers/mtd/ubi/attach.c kfree(ai); ai 1469 drivers/mtd/ubi/attach.c ai = NULL; ai 1472 drivers/mtd/ubi/attach.c return ai; ai 1487 drivers/mtd/ubi/attach.c static int scan_fast(struct ubi_device *ubi, struct ubi_attach_info **ai) ai 1521 drivers/mtd/ubi/attach.c err = ubi_scan_fastmap(ubi, *ai, scan_ai); ai 1528 drivers/mtd/ubi/attach.c destroy_ai(*ai); ai 1529 drivers/mtd/ubi/attach.c *ai = scan_ai; ai 1558 drivers/mtd/ubi/attach.c struct ubi_attach_info *ai; ai 1560 drivers/mtd/ubi/attach.c ai = alloc_ai(); ai 1561 drivers/mtd/ubi/attach.c if (!ai) ai 1572 drivers/mtd/ubi/attach.c err = scan_all(ubi, ai, 0); ai 1574 drivers/mtd/ubi/attach.c err = scan_fast(ubi, &ai); ai 1577 drivers/mtd/ubi/attach.c destroy_ai(ai); ai 1578 drivers/mtd/ubi/attach.c ai = alloc_ai(); ai 1579 drivers/mtd/ubi/attach.c if (!ai) ai 1582 drivers/mtd/ubi/attach.c err = scan_all(ubi, ai, 0); ai 1584 drivers/mtd/ubi/attach.c err = scan_all(ubi, ai, UBI_FM_MAX_START); ai 1589 drivers/mtd/ubi/attach.c err = scan_all(ubi, ai, 0); ai 1594 drivers/mtd/ubi/attach.c ubi->bad_peb_count = ai->bad_peb_count; ai 1596 drivers/mtd/ubi/attach.c ubi->corr_peb_count = ai->corr_peb_count; ai 1597 drivers/mtd/ubi/attach.c ubi->max_ec = ai->max_ec; ai 1598 drivers/mtd/ubi/attach.c ubi->mean_ec = ai->mean_ec; ai 1599 drivers/mtd/ubi/attach.c dbg_gen("max. sequence number: %llu", ai->max_sqnum); ai 1601 drivers/mtd/ubi/attach.c err = ubi_read_volume_table(ubi, ai); ai 1605 drivers/mtd/ubi/attach.c err = ubi_wl_init(ubi, ai); ai 1609 drivers/mtd/ubi/attach.c err = ubi_eba_init(ubi, ai); ai 1629 drivers/mtd/ubi/attach.c err = self_check_eba(ubi, ai, scan_ai); ai 1637 drivers/mtd/ubi/attach.c destroy_ai(ai); ai 1646 drivers/mtd/ubi/attach.c destroy_ai(ai); ai 1658 drivers/mtd/ubi/attach.c static int self_check_ai(struct ubi_device *ubi, struct ubi_attach_info *ai) ai 1660 drivers/mtd/ubi/attach.c struct ubi_vid_io_buf *vidb = ai->vidb; ai 1674 drivers/mtd/ubi/attach.c ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) { ai 1681 drivers/mtd/ubi/attach.c if (ai->is_empty) { ai 1699 drivers/mtd/ubi/attach.c if (av->vol_id > ai->highest_vol_id) { ai 1701 drivers/mtd/ubi/attach.c ai->highest_vol_id, av->vol_id); ai 1728 drivers/mtd/ubi/attach.c if (aeb->ec < ai->min_ec) { ai 1730 drivers/mtd/ubi/attach.c ai->min_ec, aeb->ec); ai 1734 drivers/mtd/ubi/attach.c if (aeb->ec > ai->max_ec) { ai 1736 drivers/mtd/ubi/attach.c ai->max_ec, aeb->ec); ai 1781 drivers/mtd/ubi/attach.c if (vols_found != ai->vols_found) { ai 1783 drivers/mtd/ubi/attach.c ai->vols_found, vols_found); ai 1788 drivers/mtd/ubi/attach.c ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) { ai 1876 drivers/mtd/ubi/attach.c ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) ai 1880 drivers/mtd/ubi/attach.c list_for_each_entry(aeb, &ai->free, u.list) ai 1883 drivers/mtd/ubi/attach.c list_for_each_entry(aeb, &ai->corr, u.list) ai 1886 drivers/mtd/ubi/attach.c list_for_each_entry(aeb, &ai->erase, u.list) ai 1889 drivers/mtd/ubi/attach.c list_for_each_entry(aeb, &ai->alien, u.list) ai 1482 drivers/mtd/ubi/eba.c struct ubi_attach_info *ai) ai 1488 drivers/mtd/ubi/eba.c if (ai->max_sqnum > (1 << 18)) { ai 1610 drivers/mtd/ubi/eba.c int ubi_eba_init(struct ubi_device *ubi, struct ubi_attach_info *ai) ai 1624 drivers/mtd/ubi/eba.c ubi->global_sqnum = ai->max_sqnum + 1; ai 1644 drivers/mtd/ubi/eba.c av = ubi_find_av(ai, idx2vol_id(ubi, i)); ai 1654 drivers/mtd/ubi/eba.c ubi_move_aeb_to_list(av, aeb, &ai->erase); ai 1682 drivers/mtd/ubi/eba.c print_rsvd_warning(ubi, ai); ai 136 drivers/mtd/ubi/fastmap.c static int add_aeb(struct ubi_attach_info *ai, struct list_head *list, ai 141 drivers/mtd/ubi/fastmap.c aeb = ubi_alloc_aeb(ai, pnum, ec); ai 149 drivers/mtd/ubi/fastmap.c ai->ec_sum += aeb->ec; ai 150 drivers/mtd/ubi/fastmap.c ai->ec_count++; ai 152 drivers/mtd/ubi/fastmap.c if (ai->max_ec < aeb->ec) ai 153 drivers/mtd/ubi/fastmap.c ai->max_ec = aeb->ec; ai 155 drivers/mtd/ubi/fastmap.c if (ai->min_ec > aeb->ec) ai 156 drivers/mtd/ubi/fastmap.c ai->min_ec = aeb->ec; ai 175 drivers/mtd/ubi/fastmap.c static struct ubi_ainf_volume *add_vol(struct ubi_attach_info *ai, int vol_id, ai 181 drivers/mtd/ubi/fastmap.c av = ubi_add_av(ai, vol_id); ai 203 drivers/mtd/ubi/fastmap.c static void assign_aeb_to_av(struct ubi_attach_info *ai, ai 242 drivers/mtd/ubi/fastmap.c static int update_vol(struct ubi_device *ubi, struct ubi_attach_info *ai, ai 269 drivers/mtd/ubi/fastmap.c ubi_free_aeb(ai, new_aeb); ai 280 drivers/mtd/ubi/fastmap.c victim = ubi_alloc_aeb(ai, aeb->pnum, aeb->ec); ai 284 drivers/mtd/ubi/fastmap.c list_add_tail(&victim->u.list, &ai->erase); ai 298 drivers/mtd/ubi/fastmap.c ubi_free_aeb(ai, new_aeb); ai 304 drivers/mtd/ubi/fastmap.c list_add_tail(&new_aeb->u.list, &ai->erase); ai 336 drivers/mtd/ubi/fastmap.c static int process_pool_aeb(struct ubi_device *ubi, struct ubi_attach_info *ai, ai 344 drivers/mtd/ubi/fastmap.c ubi_free_aeb(ai, new_aeb); ai 350 drivers/mtd/ubi/fastmap.c av = ubi_find_av(ai, vol_id); ai 353 drivers/mtd/ubi/fastmap.c ubi_free_aeb(ai, new_aeb); ai 359 drivers/mtd/ubi/fastmap.c return update_vol(ubi, ai, av, new_vh, new_aeb); ai 370 drivers/mtd/ubi/fastmap.c static void unmap_peb(struct ubi_attach_info *ai, int pnum) ai 376 drivers/mtd/ubi/fastmap.c ubi_rb_for_each_entry(node, av, &ai->volumes, rb) { ai 381 drivers/mtd/ubi/fastmap.c ubi_free_aeb(ai, aeb); ai 400 drivers/mtd/ubi/fastmap.c static int scan_pool(struct ubi_device *ubi, struct ubi_attach_info *ai, ai 465 drivers/mtd/ubi/fastmap.c unmap_peb(ai, pnum); ai 471 drivers/mtd/ubi/fastmap.c add_aeb(ai, free, pnum, ec, scrub); ai 479 drivers/mtd/ubi/fastmap.c new_aeb = ubi_alloc_aeb(ai, pnum, be64_to_cpu(ech->ec)); ai 493 drivers/mtd/ubi/fastmap.c err = process_pool_aeb(ubi, ai, vh, new_aeb); ai 517 drivers/mtd/ubi/fastmap.c static int count_fastmap_pebs(struct ubi_attach_info *ai) ai 524 drivers/mtd/ubi/fastmap.c list_for_each_entry(aeb, &ai->erase, u.list) ai 527 drivers/mtd/ubi/fastmap.c list_for_each_entry(aeb, &ai->free, u.list) ai 530 drivers/mtd/ubi/fastmap.c ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) ai 547 drivers/mtd/ubi/fastmap.c struct ubi_attach_info *ai, ai 566 drivers/mtd/ubi/fastmap.c ai->min_ec = UBI_MAX_ERASECOUNTER; ai 569 drivers/mtd/ubi/fastmap.c ai->max_sqnum = fmsb->sqnum; ai 641 drivers/mtd/ubi/fastmap.c add_aeb(ai, &ai->free, be32_to_cpu(fmec->pnum), ai 652 drivers/mtd/ubi/fastmap.c add_aeb(ai, &used, be32_to_cpu(fmec->pnum), ai 663 drivers/mtd/ubi/fastmap.c add_aeb(ai, &used, be32_to_cpu(fmec->pnum), ai 674 drivers/mtd/ubi/fastmap.c add_aeb(ai, &ai->erase, be32_to_cpu(fmec->pnum), ai 678 drivers/mtd/ubi/fastmap.c ai->mean_ec = div_u64(ai->ec_sum, ai->ec_count); ai 679 drivers/mtd/ubi/fastmap.c ai->bad_peb_count = be32_to_cpu(fmhdr->bad_peb_count); ai 694 drivers/mtd/ubi/fastmap.c av = add_vol(ai, be32_to_cpu(fmvhdr->vol_id), ai 708 drivers/mtd/ubi/fastmap.c ai->vols_found++; ai 709 drivers/mtd/ubi/fastmap.c if (ai->highest_vol_id < be32_to_cpu(fmvhdr->vol_id)) ai 710 drivers/mtd/ubi/fastmap.c ai->highest_vol_id = be32_to_cpu(fmvhdr->vol_id); ai 748 drivers/mtd/ubi/fastmap.c assign_aeb_to_av(ai, aeb, av); ai 755 drivers/mtd/ubi/fastmap.c ret = scan_pool(ubi, ai, fmpl->pebs, pool_size, &max_sqnum, &free); ai 759 drivers/mtd/ubi/fastmap.c ret = scan_pool(ubi, ai, fmpl_wl->pebs, wl_pool_size, &max_sqnum, &free); ai 763 drivers/mtd/ubi/fastmap.c if (max_sqnum > ai->max_sqnum) ai 764 drivers/mtd/ubi/fastmap.c ai->max_sqnum = max_sqnum; ai 767 drivers/mtd/ubi/fastmap.c list_move_tail(&tmp_aeb->u.list, &ai->free); ai 770 drivers/mtd/ubi/fastmap.c list_move_tail(&tmp_aeb->u.list, &ai->erase); ai 780 drivers/mtd/ubi/fastmap.c if (WARN_ON(count_fastmap_pebs(ai) != ubi->peb_count - ai 781 drivers/mtd/ubi/fastmap.c ai->bad_peb_count - fm->used_blocks)) ai 791 drivers/mtd/ubi/fastmap.c ubi_free_aeb(ai, tmp_aeb); ai 795 drivers/mtd/ubi/fastmap.c ubi_free_aeb(ai, tmp_aeb); ai 805 drivers/mtd/ubi/fastmap.c static int find_fm_anchor(struct ubi_attach_info *ai) ai 811 drivers/mtd/ubi/fastmap.c list_for_each_entry(aeb, &ai->fastmap, u.list) { ai 821 drivers/mtd/ubi/fastmap.c static struct ubi_ainf_peb *clone_aeb(struct ubi_attach_info *ai, ai 826 drivers/mtd/ubi/fastmap.c new = ubi_alloc_aeb(ai, old->pnum, old->ec); ai 850 drivers/mtd/ubi/fastmap.c int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai, ai 872 drivers/mtd/ubi/fastmap.c new = clone_aeb(ai, aeb); ai 876 drivers/mtd/ubi/fastmap.c list_add(&new->u.list, &ai->fastmap); ai 1043 drivers/mtd/ubi/fastmap.c ret = ubi_attach_fastmap(ubi, ai, fm); ai 822 drivers/mtd/ubi/ubi.h struct ubi_ainf_peb *ubi_alloc_aeb(struct ubi_attach_info *ai, int pnum, ai 824 drivers/mtd/ubi/ubi.h void ubi_free_aeb(struct ubi_attach_info *ai, struct ubi_ainf_peb *aeb); ai 825 drivers/mtd/ubi/ubi.h int ubi_add_to_av(struct ubi_device *ubi, struct ubi_attach_info *ai, int pnum, ai 827 drivers/mtd/ubi/ubi.h struct ubi_ainf_volume *ubi_add_av(struct ubi_attach_info *ai, int vol_id); ai 828 drivers/mtd/ubi/ubi.h struct ubi_ainf_volume *ubi_find_av(const struct ubi_attach_info *ai, ai 830 drivers/mtd/ubi/ubi.h void ubi_remove_av(struct ubi_attach_info *ai, struct ubi_ainf_volume *av); ai 832 drivers/mtd/ubi/ubi.h struct ubi_attach_info *ai); ai 834 drivers/mtd/ubi/ubi.h void ubi_destroy_ai(struct ubi_attach_info *ai); ai 841 drivers/mtd/ubi/ubi.h int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *ai); ai 899 drivers/mtd/ubi/ubi.h int ubi_eba_init(struct ubi_device *ubi, struct ubi_attach_info *ai); ai 910 drivers/mtd/ubi/ubi.h int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai); ai 965 drivers/mtd/ubi/ubi.h int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai, ai 285 drivers/mtd/ubi/vtbl.c static int create_vtbl(struct ubi_device *ubi, struct ubi_attach_info *ai, ai 302 drivers/mtd/ubi/vtbl.c new_aeb = ubi_early_get_peb(ubi, ai); ai 314 drivers/mtd/ubi/vtbl.c vid_hdr->sqnum = cpu_to_be64(++ai->max_sqnum); ai 330 drivers/mtd/ubi/vtbl.c err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0); ai 331 drivers/mtd/ubi/vtbl.c ubi_free_aeb(ai, new_aeb); ai 341 drivers/mtd/ubi/vtbl.c list_add(&new_aeb->u.list, &ai->erase); ai 344 drivers/mtd/ubi/vtbl.c ubi_free_aeb(ai, new_aeb); ai 362 drivers/mtd/ubi/vtbl.c struct ubi_attach_info *ai, ai 438 drivers/mtd/ubi/vtbl.c err = create_vtbl(ubi, ai, 1, leb[0]); ai 461 drivers/mtd/ubi/vtbl.c err = create_vtbl(ubi, ai, 0, leb[1]); ai 485 drivers/mtd/ubi/vtbl.c struct ubi_attach_info *ai) ai 500 drivers/mtd/ubi/vtbl.c err = create_vtbl(ubi, ai, i, vtbl); ai 521 drivers/mtd/ubi/vtbl.c const struct ubi_attach_info *ai, ai 594 drivers/mtd/ubi/vtbl.c av = ubi_find_av(ai, i); ai 719 drivers/mtd/ubi/vtbl.c struct ubi_attach_info *ai) ai 725 drivers/mtd/ubi/vtbl.c if (ai->vols_found > UBI_INT_VOL_COUNT + ubi->vtbl_slots) { ai 727 drivers/mtd/ubi/vtbl.c ai->vols_found, UBI_INT_VOL_COUNT, ubi->vtbl_slots); ai 731 drivers/mtd/ubi/vtbl.c if (ai->highest_vol_id >= ubi->vtbl_slots + UBI_INT_VOL_COUNT && ai 732 drivers/mtd/ubi/vtbl.c ai->highest_vol_id < UBI_INTERNAL_VOL_START) { ai 734 drivers/mtd/ubi/vtbl.c ai->highest_vol_id); ai 741 drivers/mtd/ubi/vtbl.c av = ubi_find_av(ai, i); ai 745 drivers/mtd/ubi/vtbl.c ubi_remove_av(ai, av); ai 763 drivers/mtd/ubi/vtbl.c ubi_remove_av(ai, av); ai 783 drivers/mtd/ubi/vtbl.c int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *ai) ai 801 drivers/mtd/ubi/vtbl.c av = ubi_find_av(ai, UBI_LAYOUT_VOLUME_ID); ai 811 drivers/mtd/ubi/vtbl.c if (ai->is_empty) { ai 812 drivers/mtd/ubi/vtbl.c ubi->vtbl = create_empty_lvol(ubi, ai); ai 827 drivers/mtd/ubi/vtbl.c ubi->vtbl = process_lvol(ubi, ai, av); ai 838 drivers/mtd/ubi/vtbl.c err = init_volumes(ubi, ai, ubi->vtbl); ai 846 drivers/mtd/ubi/vtbl.c err = check_attaching_info(ubi, ai); ai 1735 drivers/mtd/ubi/wl.c int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai) ai 1747 drivers/mtd/ubi/wl.c ubi->max_ec = ai->max_ec; ai 1762 drivers/mtd/ubi/wl.c list_for_each_entry_safe(aeb, tmp, &ai->erase, u.list) { ai 1772 drivers/mtd/ubi/wl.c list_for_each_entry(aeb, &ai->free, u.list) { ai 1793 drivers/mtd/ubi/wl.c ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) { ai 1821 drivers/mtd/ubi/wl.c list_for_each_entry(aeb, &ai->fastmap, u.list) { ai 692 drivers/net/ethernet/chelsio/cxgb3/common.h int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai, ai 3139 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void print_port_info(struct adapter *adap, const struct adapter_info *ai) ai 3164 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c ai->desc, pi->phy.desc, ai 3209 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c const struct adapter_info *ai; ai 3254 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c ai = t3_get_adapter_info(ent->driver_data); ai 3296 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c for (i = 0; i < ai->nports0 + ai->nports1; ++i) { ai 3331 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (t3_prep_adapter(adapter, ai, 1) < 0) { ai 3390 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c print_port_info(adapter, ai); ai 3398 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c for (i = ai->nports0 + ai->nports1 - 1; i >= 0; --i) ai 196 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void mi1_init(struct adapter *adap, const struct adapter_info *ai) ai 3560 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c const struct adapter_info *ai) ai 3564 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mi1_init(adapter, ai); ai 3568 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ai->gpio_out | F_GPIO0_OEN | F_GPIO0_OUT_VAL); ai 3655 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai, ai 3663 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c adapter->params.info = ai; ai 3664 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c adapter->params.nports = ai->nports0 + ai->nports1; ai 3665 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c adapter->params.chan_map = (!!ai->nports0) | (!!ai->nports1 << 1); ai 3725 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c early_hw_init(adapter, ai); ai 3746 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j, ai 3747 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ai->mdio_ops); ai 3786 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c const struct adapter_info *ai = adapter->params.info; ai 3790 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c early_hw_init(adapter, ai); ai 371 drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c unsigned char ai, ai_mask; ai 375 drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c ai = pe.tcam[MVPP2_PRS_TCAM_AI_WORD] & MVPP2_PRS_AI_MASK; ai 378 drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c seq_printf(s, "%02x %02x\n", ai, ai_mask); ai 632 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c static int mvpp2_prs_vlan_find(struct mvpp2 *priv, unsigned short tpid, int ai) ai 661 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c if (ai != ai_bits) ai 673 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c static int mvpp2_prs_vlan_add(struct mvpp2 *priv, unsigned short tpid, int ai, ai 682 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c tid = mvpp2_prs_vlan_find(priv, tpid, ai); ai 722 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c if (ai == MVPP2_PRS_SINGLE_VLAN_AI) { ai 726 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c ai |= MVPP2_PRS_DBL_VLAN_AI_BIT; ai 730 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c mvpp2_prs_tcam_ai_update(&pe, ai, MVPP2_PRS_SRAM_AI_MASK); ai 795 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c int tid_aux, tid, ai, ret = 0; ai 810 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c ai = mvpp2_prs_double_vlan_ai_free_get(priv); ai 811 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c if (ai < 0) ai 812 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c return ai; ai 838 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c priv->prs_double_vlans[ai] = true; ai 849 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c mvpp2_prs_sram_ai_update(&pe, ai | MVPP2_PRS_DBL_VLAN_AI_BIT, ai 61 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.h #define MVPP2_PRS_TCAM_AI(ai) (ai) ai 62 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.h #define MVPP2_PRS_TCAM_AI_EN(ai) MVPP2_PRS_TCAM_EN(MVPP2_PRS_TCAM_AI(ai)) ai 42 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c struct mlx5e_l2_rule *ai, int type); ai 44 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c struct mlx5e_l2_rule *ai); ai 68 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c struct mlx5e_l2_rule ai; ai 84 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c if (ether_addr_equal_64bits(hn->ai.addr, addr)) { ai 98 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c ether_addr_copy(hn->ai.addr, addr); ai 434 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c ether_addr_copy(mac_addr, hn->ai.addr); ai 438 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c mlx5e_add_l2_flow_rule(priv, &hn->ai, MLX5E_FULLMATCH); ai 449 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c mlx5e_del_l2_flow_rule(priv, &hn->ai); ai 497 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c if (ether_addr_equal(ndev->dev_addr, hn->ai.addr)) ai 501 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c ether_addr_copy(addr_array[i++], hn->ai.addr); ai 1214 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c struct mlx5e_l2_rule *ai) ai 1216 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c if (!IS_ERR_OR_NULL(ai->rule)) { ai 1217 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c mlx5_del_flow_rules(ai->rule); ai 1218 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c ai->rule = NULL; ai 1223 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c struct mlx5e_l2_rule *ai, int type) ai 1249 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c ether_addr_copy(mv_dmac, ai->addr); ai 1262 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c ai->rule = mlx5_add_flow_rules(ft, spec, &flow_act, &dest, 1); ai 1263 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c if (IS_ERR(ai->rule)) { ai 1266 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c err = PTR_ERR(ai->rule); ai 1267 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c ai->rule = NULL; ai 1111 drivers/net/wireless/cisco/airo.c static int enable_MAC(struct airo_info *ai, int lock); ai 1112 drivers/net/wireless/cisco/airo.c static void disable_MAC(struct airo_info *ai, int lock); ai 1135 drivers/net/wireless/cisco/airo.c static void mpi_receive_802_3(struct airo_info *ai); ai 1136 drivers/net/wireless/cisco/airo.c static void mpi_receive_802_11(struct airo_info *ai); ai 1137 drivers/net/wireless/cisco/airo.c static int waitbusy (struct airo_info *ai); ai 1150 drivers/net/wireless/cisco/airo.c static void micinit(struct airo_info *ai); ai 1151 drivers/net/wireless/cisco/airo.c static int micsetup(struct airo_info *ai); ai 1152 drivers/net/wireless/cisco/airo.c static int encapsulate(struct airo_info *ai, etherHead *pPacket, MICBuffer *buffer, int len); ai 1153 drivers/net/wireless/cisco/airo.c static int decapsulate(struct airo_info *ai, MICBuffer *mic, etherHead *pPacket, u16 payLen); ai 1158 drivers/net/wireless/cisco/airo.c static void airo_networks_free(struct airo_info *ai); ai 1255 drivers/net/wireless/cisco/airo.c static inline int bap_read(struct airo_info *ai, __le16 *pu16Dst, int bytelen, ai 1258 drivers/net/wireless/cisco/airo.c return ai->bap_read(ai, pu16Dst, bytelen, whichbap); ai 1266 drivers/net/wireless/cisco/airo.c static int cmdreset(struct airo_info *ai); ai 1267 drivers/net/wireless/cisco/airo.c static int setflashmode (struct airo_info *ai); ai 1268 drivers/net/wireless/cisco/airo.c static int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime); ai 1269 drivers/net/wireless/cisco/airo.c static int flashputbuf(struct airo_info *ai); ai 1270 drivers/net/wireless/cisco/airo.c static int flashrestart(struct airo_info *ai,struct net_device *dev); ai 1294 drivers/net/wireless/cisco/airo.c static int RxSeqValid (struct airo_info *ai,miccntx *context,int mcast,u32 micSeq); ai 1301 drivers/net/wireless/cisco/airo.c static int flashpchar(struct airo_info *ai,int byte,int dwelltime); ai 1328 drivers/net/wireless/cisco/airo.c static void micinit(struct airo_info *ai) ai 1332 drivers/net/wireless/cisco/airo.c clear_bit(JOB_MIC, &ai->jobs); ai 1333 drivers/net/wireless/cisco/airo.c PC4500_readrid(ai, RID_MIC, &mic_rid, sizeof(mic_rid), 0); ai 1334 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 1336 drivers/net/wireless/cisco/airo.c ai->micstats.enabled = (le16_to_cpu(mic_rid.state) & 0x00FF) ? 1 : 0; ai 1337 drivers/net/wireless/cisco/airo.c if (!ai->micstats.enabled) { ai 1341 drivers/net/wireless/cisco/airo.c ai->mod[0].uCtx.valid = 0; ai 1342 drivers/net/wireless/cisco/airo.c ai->mod[0].mCtx.valid = 0; ai 1347 drivers/net/wireless/cisco/airo.c age_mic_context(&ai->mod[0].mCtx, &ai->mod[1].mCtx, ai 1349 drivers/net/wireless/cisco/airo.c ai->tfm); ai 1353 drivers/net/wireless/cisco/airo.c age_mic_context(&ai->mod[0].uCtx, &ai->mod[1].uCtx, ai 1355 drivers/net/wireless/cisco/airo.c ai->tfm); ai 1361 drivers/net/wireless/cisco/airo.c static int micsetup(struct airo_info *ai) { ai 1364 drivers/net/wireless/cisco/airo.c if (ai->tfm == NULL) ai 1365 drivers/net/wireless/cisco/airo.c ai->tfm = crypto_alloc_sync_skcipher("ctr(aes)", 0, 0); ai 1367 drivers/net/wireless/cisco/airo.c if (IS_ERR(ai->tfm)) { ai 1368 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "failed to load transform for AES"); ai 1369 drivers/net/wireless/cisco/airo.c ai->tfm = NULL; ai 1374 drivers/net/wireless/cisco/airo.c memset(&ai->mod[i].mCtx,0,sizeof(miccntx)); ai 1375 drivers/net/wireless/cisco/airo.c memset(&ai->mod[i].uCtx,0,sizeof(miccntx)); ai 1398 drivers/net/wireless/cisco/airo.c static int encapsulate(struct airo_info *ai ,etherHead *frame, MICBuffer *mic, int payLen) ai 1405 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_ADHOC, &ai->flags) && (frame->da[0] & 0x1)) ai 1406 drivers/net/wireless/cisco/airo.c context = &ai->mod[0].mCtx; ai 1408 drivers/net/wireless/cisco/airo.c context = &ai->mod[0].uCtx; ai 1454 drivers/net/wireless/cisco/airo.c static int decapsulate(struct airo_info *ai, MICBuffer *mic, etherHead *eth, u16 payLen) ai 1464 drivers/net/wireless/cisco/airo.c if (!ai->micstats.enabled) { ai 1467 drivers/net/wireless/cisco/airo.c ai->micstats.rxMICPlummed++; ai 1478 drivers/net/wireless/cisco/airo.c ai->micstats.rxMICPlummed++; ai 1489 drivers/net/wireless/cisco/airo.c ai->micstats.rxWrongSequence++; ai 1496 drivers/net/wireless/cisco/airo.c context = mcast ? &ai->mod[i].mCtx : &ai->mod[i].uCtx; ai 1525 drivers/net/wireless/cisco/airo.c if (RxSeqValid(ai, context, mcast, micSEQ) == SUCCESS) { ai 1526 drivers/net/wireless/cisco/airo.c ai->micstats.rxSuccess++; ai 1535 drivers/net/wireless/cisco/airo.c case NOMICPLUMMED: ai->micstats.rxMICPlummed++; break; ai 1536 drivers/net/wireless/cisco/airo.c case SEQUENCE: ai->micstats.rxWrongSequence++; break; ai 1537 drivers/net/wireless/cisco/airo.c case INCORRECTMIC: ai->micstats.rxIncorrectMIC++; break; ai 1558 drivers/net/wireless/cisco/airo.c static int RxSeqValid (struct airo_info *ai,miccntx *context,int mcast,u32 micSeq) ai 1566 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_UPDATE_MULTI, &ai->flags)) { ai 1567 drivers/net/wireless/cisco/airo.c clear_bit (FLAG_UPDATE_MULTI, &ai->flags); ai 1571 drivers/net/wireless/cisco/airo.c } else if (test_bit(FLAG_UPDATE_UNI, &ai->flags)) { ai 1572 drivers/net/wireless/cisco/airo.c clear_bit (FLAG_UPDATE_UNI, &ai->flags); ai 1741 drivers/net/wireless/cisco/airo.c static int readBSSListRid(struct airo_info *ai, int first, ai 1748 drivers/net/wireless/cisco/airo.c if (ai->flags & FLAG_RADIO_MASK) return -ENETDOWN; ai 1751 drivers/net/wireless/cisco/airo.c if (down_interruptible(&ai->sem)) ai 1753 drivers/net/wireless/cisco/airo.c ai->list_bss_task = current; ai 1754 drivers/net/wireless/cisco/airo.c issuecommand(ai, &cmd, &rsp); ai 1755 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 1758 drivers/net/wireless/cisco/airo.c ai->list_bss_task = NULL; ai 1760 drivers/net/wireless/cisco/airo.c return PC4500_readrid(ai, first ? ai->bssListFirst : ai->bssListNext, ai 1761 drivers/net/wireless/cisco/airo.c list, ai->bssListRidLen, 1); ai 1764 drivers/net/wireless/cisco/airo.c static int readWepKeyRid(struct airo_info *ai, WepKeyRid *wkr, int temp, int lock) ai 1766 drivers/net/wireless/cisco/airo.c return PC4500_readrid(ai, temp ? RID_WEP_TEMP : RID_WEP_PERM, ai 1770 drivers/net/wireless/cisco/airo.c static int writeWepKeyRid(struct airo_info *ai, WepKeyRid *wkr, int perm, int lock) ai 1773 drivers/net/wireless/cisco/airo.c rc = PC4500_writerid(ai, RID_WEP_TEMP, wkr, sizeof(*wkr), lock); ai 1775 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "WEP_TEMP set %x", rc); ai 1777 drivers/net/wireless/cisco/airo.c rc = PC4500_writerid(ai, RID_WEP_PERM, wkr, sizeof(*wkr), lock); ai 1779 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "WEP_PERM set %x", rc); ai 1784 drivers/net/wireless/cisco/airo.c static int readSsidRid(struct airo_info*ai, SsidRid *ssidr) ai 1786 drivers/net/wireless/cisco/airo.c return PC4500_readrid(ai, RID_SSID, ssidr, sizeof(*ssidr), 1); ai 1789 drivers/net/wireless/cisco/airo.c static int writeSsidRid(struct airo_info*ai, SsidRid *pssidr, int lock) ai 1791 drivers/net/wireless/cisco/airo.c return PC4500_writerid(ai, RID_SSID, pssidr, sizeof(*pssidr), lock); ai 1794 drivers/net/wireless/cisco/airo.c static int readConfigRid(struct airo_info *ai, int lock) ai 1799 drivers/net/wireless/cisco/airo.c if (ai->config.len) ai 1802 drivers/net/wireless/cisco/airo.c rc = PC4500_readrid(ai, RID_ACTUALCONFIG, &cfg, sizeof(cfg), lock); ai 1806 drivers/net/wireless/cisco/airo.c ai->config = cfg; ai 1810 drivers/net/wireless/cisco/airo.c static inline void checkThrottle(struct airo_info *ai) ai 1814 drivers/net/wireless/cisco/airo.c if (ai->config.authType != AUTH_OPEN && maxencrypt) { ai 1816 drivers/net/wireless/cisco/airo.c if (ai->config.rates[i] > maxencrypt) { ai 1817 drivers/net/wireless/cisco/airo.c ai->config.rates[i] = 0; ai 1823 drivers/net/wireless/cisco/airo.c static int writeConfigRid(struct airo_info *ai, int lock) ai 1827 drivers/net/wireless/cisco/airo.c if (!test_bit (FLAG_COMMIT, &ai->flags)) ai 1830 drivers/net/wireless/cisco/airo.c clear_bit (FLAG_COMMIT, &ai->flags); ai 1831 drivers/net/wireless/cisco/airo.c clear_bit (FLAG_RESET, &ai->flags); ai 1832 drivers/net/wireless/cisco/airo.c checkThrottle(ai); ai 1833 drivers/net/wireless/cisco/airo.c cfgr = ai->config; ai 1836 drivers/net/wireless/cisco/airo.c set_bit(FLAG_ADHOC, &ai->flags); ai 1838 drivers/net/wireless/cisco/airo.c clear_bit(FLAG_ADHOC, &ai->flags); ai 1840 drivers/net/wireless/cisco/airo.c return PC4500_writerid( ai, RID_CONFIG, &cfgr, sizeof(cfgr), lock); ai 1843 drivers/net/wireless/cisco/airo.c static int readStatusRid(struct airo_info *ai, StatusRid *statr, int lock) ai 1845 drivers/net/wireless/cisco/airo.c return PC4500_readrid(ai, RID_STATUS, statr, sizeof(*statr), lock); ai 1848 drivers/net/wireless/cisco/airo.c static int writeAPListRid(struct airo_info *ai, APListRid *aplr, int lock) ai 1850 drivers/net/wireless/cisco/airo.c return PC4500_writerid(ai, RID_APLIST, aplr, sizeof(*aplr), lock); ai 1853 drivers/net/wireless/cisco/airo.c static int readCapabilityRid(struct airo_info *ai, CapabilityRid *capr, int lock) ai 1855 drivers/net/wireless/cisco/airo.c return PC4500_readrid(ai, RID_CAPABILITIES, capr, sizeof(*capr), lock); ai 1858 drivers/net/wireless/cisco/airo.c static int readStatsRid(struct airo_info*ai, StatsRid *sr, int rid, int lock) ai 1860 drivers/net/wireless/cisco/airo.c return PC4500_readrid(ai, rid, sr, sizeof(*sr), lock); ai 1863 drivers/net/wireless/cisco/airo.c static void try_auto_wep(struct airo_info *ai) ai 1865 drivers/net/wireless/cisco/airo.c if (auto_wep && !test_bit(FLAG_RADIO_DOWN, &ai->flags)) { ai 1866 drivers/net/wireless/cisco/airo.c ai->expires = RUN_AT(3*HZ); ai 1867 drivers/net/wireless/cisco/airo.c wake_up_interruptible(&ai->thr_wait); ai 1872 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 1875 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_FLASHING, &ai->flags)) ai 1882 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_COMMIT, &ai->flags)) { ai 1883 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 1); ai 1884 drivers/net/wireless/cisco/airo.c writeConfigRid(ai, 1); ai 1887 drivers/net/wireless/cisco/airo.c if (ai->wifidev != dev) { ai 1888 drivers/net/wireless/cisco/airo.c clear_bit(JOB_DIE, &ai->jobs); ai 1889 drivers/net/wireless/cisco/airo.c ai->airo_thread_task = kthread_run(airo_thread, dev, "%s", ai 1891 drivers/net/wireless/cisco/airo.c if (IS_ERR(ai->airo_thread_task)) ai 1892 drivers/net/wireless/cisco/airo.c return (int)PTR_ERR(ai->airo_thread_task); ai 1900 drivers/net/wireless/cisco/airo.c set_bit(JOB_DIE, &ai->jobs); ai 1901 drivers/net/wireless/cisco/airo.c kthread_stop(ai->airo_thread_task); ai 1906 drivers/net/wireless/cisco/airo.c clear_bit(FLAG_RADIO_DOWN, &ai->flags); ai 1907 drivers/net/wireless/cisco/airo.c enable_interrupts(ai); ai 1909 drivers/net/wireless/cisco/airo.c try_auto_wep(ai); ai 1911 drivers/net/wireless/cisco/airo.c enable_MAC(ai, 1); ai 1922 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 1932 drivers/net/wireless/cisco/airo.c npacks = skb_queue_len (&ai->txq); ai 1940 drivers/net/wireless/cisco/airo.c skb_queue_tail (&ai->txq, skb); ai 1944 drivers/net/wireless/cisco/airo.c spin_lock_irqsave(&ai->aux_lock, flags); ai 1945 drivers/net/wireless/cisco/airo.c skb_queue_tail (&ai->txq, skb); ai 1946 drivers/net/wireless/cisco/airo.c pending = test_bit(FLAG_PENDING_XMIT, &ai->flags); ai 1947 drivers/net/wireless/cisco/airo.c spin_unlock_irqrestore(&ai->aux_lock,flags); ai 1951 drivers/net/wireless/cisco/airo.c set_bit(FLAG_PENDING_XMIT, &ai->flags); ai 1970 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 1975 drivers/net/wireless/cisco/airo.c if ((skb = skb_dequeue(&ai->txq)) == NULL) { ai 1986 drivers/net/wireless/cisco/airo.c ai->txfids[0].tx_desc.offset = 0; ai 1987 drivers/net/wireless/cisco/airo.c ai->txfids[0].tx_desc.valid = 1; ai 1988 drivers/net/wireless/cisco/airo.c ai->txfids[0].tx_desc.eoc = 1; ai 1989 drivers/net/wireless/cisco/airo.c ai->txfids[0].tx_desc.len =len+sizeof(WifiHdr); ai 1999 drivers/net/wireless/cisco/airo.c memcpy(ai->txfids[0].virtual_host_addr, ai 2002 drivers/net/wireless/cisco/airo.c payloadLen = (__le16 *)(ai->txfids[0].virtual_host_addr + ai 2004 drivers/net/wireless/cisco/airo.c sendbuf = ai->txfids[0].virtual_host_addr + ai 2011 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled && ai 2015 drivers/net/wireless/cisco/airo.c if (encapsulate(ai, (etherHead *)buffer, &pMic, len - sizeof(etherHead)) != SUCCESS) ai 2019 drivers/net/wireless/cisco/airo.c ai->txfids[0].tx_desc.len += sizeof(pMic); ai 2036 drivers/net/wireless/cisco/airo.c memcpy_toio(ai->txfids[0].card_ram_off, ai 2037 drivers/net/wireless/cisco/airo.c &ai->txfids[0].tx_desc, sizeof(TxFid)); ai 2039 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, 8); ai 2045 drivers/net/wireless/cisco/airo.c static void get_tx_error(struct airo_info *ai, s32 fid) ai 2050 drivers/net/wireless/cisco/airo.c status = ((WifiCtlHdr *)ai->txfids[0].virtual_host_addr)->ctlhdr.status; ai 2052 drivers/net/wireless/cisco/airo.c if (bap_setup(ai, ai->fids[fid] & 0xffff, 4, BAP0) != SUCCESS) ai 2054 drivers/net/wireless/cisco/airo.c bap_read(ai, &status, 2, BAP0); ai 2057 drivers/net/wireless/cisco/airo.c ai->dev->stats.tx_aborted_errors++; ai 2059 drivers/net/wireless/cisco/airo.c ai->dev->stats.tx_heartbeat_errors++; ai 2063 drivers/net/wireless/cisco/airo.c ai->dev->stats.tx_carrier_errors++; ai 2078 drivers/net/wireless/cisco/airo.c bap_read(ai, (__le16 *) junk, 0x18, BAP0); ai 2092 drivers/net/wireless/cisco/airo.c wireless_send_event(ai->dev, IWEVTXDROP, &wrqu, NULL); ai 2247 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 2251 drivers/net/wireless/cisco/airo.c clear_bit(JOB_STATS, &ai->jobs); ai 2252 drivers/net/wireless/cisco/airo.c if (ai->power.event) { ai 2253 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 2256 drivers/net/wireless/cisco/airo.c readStatsRid(ai, &stats_rid, RID_STATS, 0); ai 2257 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 2295 drivers/net/wireless/cisco/airo.c static void airo_set_promisc(struct airo_info *ai) { ai 2301 drivers/net/wireless/cisco/airo.c clear_bit(JOB_PROMISC, &ai->jobs); ai 2302 drivers/net/wireless/cisco/airo.c cmd.parm0=(ai->flags&IFF_PROMISC) ? PROMISC : NOPROMISC; ai 2303 drivers/net/wireless/cisco/airo.c issuecommand(ai, &cmd, &rsp); ai 2304 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 2308 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 2310 drivers/net/wireless/cisco/airo.c if ((dev->flags ^ ai->flags) & IFF_PROMISC) { ai 2311 drivers/net/wireless/cisco/airo.c change_bit(FLAG_PROMISC, &ai->flags); ai 2312 drivers/net/wireless/cisco/airo.c if (down_trylock(&ai->sem) != 0) { ai 2313 drivers/net/wireless/cisco/airo.c set_bit(JOB_PROMISC, &ai->jobs); ai 2314 drivers/net/wireless/cisco/airo.c wake_up_interruptible(&ai->thr_wait); ai 2316 drivers/net/wireless/cisco/airo.c airo_set_promisc(ai); ai 2326 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 2329 drivers/net/wireless/cisco/airo.c readConfigRid(ai, 1); ai 2330 drivers/net/wireless/cisco/airo.c memcpy (ai->config.macAddr, addr->sa_data, dev->addr_len); ai 2331 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 2332 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 1); ai 2333 drivers/net/wireless/cisco/airo.c writeConfigRid (ai, 1); ai 2334 drivers/net/wireless/cisco/airo.c enable_MAC(ai, 1); ai 2335 drivers/net/wireless/cisco/airo.c memcpy (ai->dev->dev_addr, addr->sa_data, dev->addr_len); ai 2336 drivers/net/wireless/cisco/airo.c if (ai->wifidev) ai 2337 drivers/net/wireless/cisco/airo.c memcpy (ai->wifidev->dev_addr, addr->sa_data, dev->addr_len); ai 2343 drivers/net/wireless/cisco/airo.c static void add_airo_dev(struct airo_info *ai) ai 2347 drivers/net/wireless/cisco/airo.c if (!ai->pci) ai 2348 drivers/net/wireless/cisco/airo.c list_add_tail(&ai->dev_list, &airo_devices); ai 2351 drivers/net/wireless/cisco/airo.c static void del_airo_dev(struct airo_info *ai) ai 2353 drivers/net/wireless/cisco/airo.c if (!ai->pci) ai 2354 drivers/net/wireless/cisco/airo.c list_del(&ai->dev_list); ai 2358 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 2362 drivers/net/wireless/cisco/airo.c if (ai->wifidev != dev) { ai 2369 drivers/net/wireless/cisco/airo.c set_bit(FLAG_RADIO_DOWN, &ai->flags); ai 2370 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 1); ai 2372 drivers/net/wireless/cisco/airo.c disable_interrupts( ai ); ai 2376 drivers/net/wireless/cisco/airo.c set_bit(JOB_DIE, &ai->jobs); ai 2377 drivers/net/wireless/cisco/airo.c kthread_stop(ai->airo_thread_task); ai 2384 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 2386 drivers/net/wireless/cisco/airo.c set_bit(FLAG_RADIO_DOWN, &ai->flags); ai 2387 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 1); ai 2388 drivers/net/wireless/cisco/airo.c disable_interrupts(ai); ai 2389 drivers/net/wireless/cisco/airo.c takedown_proc_entry( dev, ai ); ai 2390 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_REGISTERED, &ai->flags)) { ai 2392 drivers/net/wireless/cisco/airo.c if (ai->wifidev) { ai 2393 drivers/net/wireless/cisco/airo.c unregister_netdev(ai->wifidev); ai 2394 drivers/net/wireless/cisco/airo.c free_netdev(ai->wifidev); ai 2395 drivers/net/wireless/cisco/airo.c ai->wifidev = NULL; ai 2397 drivers/net/wireless/cisco/airo.c clear_bit(FLAG_REGISTERED, &ai->flags); ai 2402 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI, &ai->flags) && !skb_queue_empty(&ai->txq)) { ai 2404 drivers/net/wireless/cisco/airo.c for (;(skb = skb_dequeue(&ai->txq));) ai 2408 drivers/net/wireless/cisco/airo.c airo_networks_free (ai); ai 2410 drivers/net/wireless/cisco/airo.c kfree(ai->flash); ai 2411 drivers/net/wireless/cisco/airo.c kfree(ai->rssi); ai 2412 drivers/net/wireless/cisco/airo.c kfree(ai->SSID); ai 2416 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI, &ai->flags)) { ai 2417 drivers/net/wireless/cisco/airo.c if (ai->pci) ai 2418 drivers/net/wireless/cisco/airo.c mpi_unmap_card(ai->pci); ai 2419 drivers/net/wireless/cisco/airo.c if (ai->pcimem) ai 2420 drivers/net/wireless/cisco/airo.c iounmap(ai->pcimem); ai 2421 drivers/net/wireless/cisco/airo.c if (ai->pciaux) ai 2422 drivers/net/wireless/cisco/airo.c iounmap(ai->pciaux); ai 2423 drivers/net/wireless/cisco/airo.c pci_free_consistent(ai->pci, PCI_SHARED_LEN, ai 2424 drivers/net/wireless/cisco/airo.c ai->shared, ai->shared_dma); ai 2427 drivers/net/wireless/cisco/airo.c crypto_free_sync_skcipher(ai->tfm); ai 2428 drivers/net/wireless/cisco/airo.c del_airo_dev(ai); ai 2458 drivers/net/wireless/cisco/airo.c static int mpi_init_descriptors (struct airo_info *ai) ai 2466 drivers/net/wireless/cisco/airo.c netif_stop_queue(ai->dev); ai 2473 drivers/net/wireless/cisco/airo.c cmd.parm1 = (ai->rxfids[0].card_ram_off - ai->pciaux); ai 2475 drivers/net/wireless/cisco/airo.c rc=issuecommand(ai, &cmd, &rsp); ai 2477 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "Couldn't allocate RX FID"); ai 2482 drivers/net/wireless/cisco/airo.c memcpy_toio(ai->rxfids[i].card_ram_off, ai 2483 drivers/net/wireless/cisco/airo.c &ai->rxfids[i].rx_desc, sizeof(RxFid)); ai 2493 drivers/net/wireless/cisco/airo.c cmd.parm1 = (ai->txfids[0].card_ram_off - ai->pciaux); ai 2497 drivers/net/wireless/cisco/airo.c ai->txfids[i].tx_desc.valid = 1; ai 2498 drivers/net/wireless/cisco/airo.c memcpy_toio(ai->txfids[i].card_ram_off, ai 2499 drivers/net/wireless/cisco/airo.c &ai->txfids[i].tx_desc, sizeof(TxFid)); ai 2501 drivers/net/wireless/cisco/airo.c ai->txfids[i-1].tx_desc.eoc = 1; /* Last descriptor has EOC set */ ai 2503 drivers/net/wireless/cisco/airo.c rc=issuecommand(ai, &cmd, &rsp); ai 2505 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "Couldn't allocate TX FID"); ai 2515 drivers/net/wireless/cisco/airo.c cmd.parm1 = (ai->config_desc.card_ram_off - ai->pciaux); ai 2517 drivers/net/wireless/cisco/airo.c rc=issuecommand(ai, &cmd, &rsp); ai 2519 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "Couldn't allocate RID"); ai 2523 drivers/net/wireless/cisco/airo.c memcpy_toio(ai->config_desc.card_ram_off, ai 2524 drivers/net/wireless/cisco/airo.c &ai->config_desc.rid_desc, sizeof(Rid)); ai 2535 drivers/net/wireless/cisco/airo.c static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci) ai 2560 drivers/net/wireless/cisco/airo.c ai->pcimem = ioremap(mem_start, mem_len); ai 2561 drivers/net/wireless/cisco/airo.c if (!ai->pcimem) { ai 2566 drivers/net/wireless/cisco/airo.c ai->pciaux = ioremap(aux_start, aux_len); ai 2567 drivers/net/wireless/cisco/airo.c if (!ai->pciaux) { ai 2574 drivers/net/wireless/cisco/airo.c ai->shared = pci_alloc_consistent(pci, PCI_SHARED_LEN, &ai->shared_dma); ai 2575 drivers/net/wireless/cisco/airo.c if (!ai->shared) { ai 2584 drivers/net/wireless/cisco/airo.c busaddroff = ai->shared_dma; ai 2585 drivers/net/wireless/cisco/airo.c pciaddroff = ai->pciaux + AUX_OFFSET; ai 2586 drivers/net/wireless/cisco/airo.c vpackoff = ai->shared; ai 2590 drivers/net/wireless/cisco/airo.c ai->rxfids[i].pending = 0; ai 2591 drivers/net/wireless/cisco/airo.c ai->rxfids[i].card_ram_off = pciaddroff; ai 2592 drivers/net/wireless/cisco/airo.c ai->rxfids[i].virtual_host_addr = vpackoff; ai 2593 drivers/net/wireless/cisco/airo.c ai->rxfids[i].rx_desc.host_addr = busaddroff; ai 2594 drivers/net/wireless/cisco/airo.c ai->rxfids[i].rx_desc.valid = 1; ai 2595 drivers/net/wireless/cisco/airo.c ai->rxfids[i].rx_desc.len = PKTSIZE; ai 2596 drivers/net/wireless/cisco/airo.c ai->rxfids[i].rx_desc.rdy = 0; ai 2605 drivers/net/wireless/cisco/airo.c ai->txfids[i].card_ram_off = pciaddroff; ai 2606 drivers/net/wireless/cisco/airo.c ai->txfids[i].virtual_host_addr = vpackoff; ai 2607 drivers/net/wireless/cisco/airo.c ai->txfids[i].tx_desc.valid = 1; ai 2608 drivers/net/wireless/cisco/airo.c ai->txfids[i].tx_desc.host_addr = busaddroff; ai 2609 drivers/net/wireless/cisco/airo.c memcpy(ai->txfids[i].virtual_host_addr, ai 2616 drivers/net/wireless/cisco/airo.c ai->txfids[i-1].tx_desc.eoc = 1; /* Last descriptor has EOC set */ ai 2619 drivers/net/wireless/cisco/airo.c ai->config_desc.card_ram_off = pciaddroff; ai 2620 drivers/net/wireless/cisco/airo.c ai->config_desc.virtual_host_addr = vpackoff; ai 2621 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.host_addr = busaddroff; ai 2622 drivers/net/wireless/cisco/airo.c ai->ridbus = busaddroff; ai 2623 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.rid = 0; ai 2624 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.len = RIDSIZE; ai 2625 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.valid = 1; ai 2631 drivers/net/wireless/cisco/airo.c if (mpi_init_descriptors (ai) != SUCCESS) ai 2636 drivers/net/wireless/cisco/airo.c pci_free_consistent(pci, PCI_SHARED_LEN, ai->shared, ai->shared_dma); ai 2638 drivers/net/wireless/cisco/airo.c iounmap(ai->pciaux); ai 2640 drivers/net/wireless/cisco/airo.c iounmap(ai->pcimem); ai 2681 drivers/net/wireless/cisco/airo.c static struct net_device *init_wifidev(struct airo_info *ai, ai 2704 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 2706 drivers/net/wireless/cisco/airo.c if (lock && down_interruptible(&ai->sem)) ai 2708 drivers/net/wireless/cisco/airo.c waitbusy (ai); ai 2709 drivers/net/wireless/cisco/airo.c OUT4500(ai,COMMAND,CMD_SOFTRESET); ai 2711 drivers/net/wireless/cisco/airo.c waitbusy (ai); ai 2714 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 2719 drivers/net/wireless/cisco/airo.c static int airo_networks_allocate(struct airo_info *ai) ai 2721 drivers/net/wireless/cisco/airo.c if (ai->networks) ai 2724 drivers/net/wireless/cisco/airo.c ai->networks = kcalloc(AIRO_MAX_NETWORK_COUNT, sizeof(BSSListElement), ai 2726 drivers/net/wireless/cisco/airo.c if (!ai->networks) { ai 2734 drivers/net/wireless/cisco/airo.c static void airo_networks_free(struct airo_info *ai) ai 2736 drivers/net/wireless/cisco/airo.c kfree(ai->networks); ai 2737 drivers/net/wireless/cisco/airo.c ai->networks = NULL; ai 2740 drivers/net/wireless/cisco/airo.c static void airo_networks_initialize(struct airo_info *ai) ai 2744 drivers/net/wireless/cisco/airo.c INIT_LIST_HEAD(&ai->network_free_list); ai 2745 drivers/net/wireless/cisco/airo.c INIT_LIST_HEAD(&ai->network_list); ai 2747 drivers/net/wireless/cisco/airo.c list_add_tail(&ai->networks[i].list, ai 2748 drivers/net/wireless/cisco/airo.c &ai->network_free_list); ai 2779 drivers/net/wireless/cisco/airo.c struct airo_info *ai; ai 2784 drivers/net/wireless/cisco/airo.c dev = alloc_netdev(sizeof(*ai), "", NET_NAME_UNKNOWN, ether_setup); ai 2790 drivers/net/wireless/cisco/airo.c ai = dev->ml_priv = netdev_priv(dev); ai 2791 drivers/net/wireless/cisco/airo.c ai->wifidev = NULL; ai 2792 drivers/net/wireless/cisco/airo.c ai->flags = 1 << FLAG_RADIO_DOWN; ai 2793 drivers/net/wireless/cisco/airo.c ai->jobs = 0; ai 2794 drivers/net/wireless/cisco/airo.c ai->dev = dev; ai 2797 drivers/net/wireless/cisco/airo.c set_bit(FLAG_MPI, &ai->flags); ai 2799 drivers/net/wireless/cisco/airo.c spin_lock_init(&ai->aux_lock); ai 2800 drivers/net/wireless/cisco/airo.c sema_init(&ai->sem, 1); ai 2801 drivers/net/wireless/cisco/airo.c ai->config.len = 0; ai 2802 drivers/net/wireless/cisco/airo.c ai->pci = pci; ai 2803 drivers/net/wireless/cisco/airo.c init_waitqueue_head (&ai->thr_wait); ai 2804 drivers/net/wireless/cisco/airo.c ai->tfm = NULL; ai 2805 drivers/net/wireless/cisco/airo.c add_airo_dev(ai); ai 2806 drivers/net/wireless/cisco/airo.c ai->APList.len = cpu_to_le16(sizeof(struct APListRid)); ai 2808 drivers/net/wireless/cisco/airo.c if (airo_networks_allocate (ai)) ai 2810 drivers/net/wireless/cisco/airo.c airo_networks_initialize (ai); ai 2812 drivers/net/wireless/cisco/airo.c skb_queue_head_init (&ai->txq); ai 2815 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI,&ai->flags)) ai 2820 drivers/net/wireless/cisco/airo.c ai->wireless_data.spy_data = &ai->spy_data; ai 2821 drivers/net/wireless/cisco/airo.c dev->wireless_data = &ai->wireless_data; ai 2840 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI,&ai->flags)) { ai 2841 drivers/net/wireless/cisco/airo.c if (mpi_map_card(ai, pci)) { ai 2848 drivers/net/wireless/cisco/airo.c if (setup_card(ai, dev->dev_addr, 1) != SUCCESS) { ai 2853 drivers/net/wireless/cisco/airo.c } else if (!test_bit(FLAG_MPI,&ai->flags)) { ai 2854 drivers/net/wireless/cisco/airo.c ai->bap_read = fast_bap_read; ai 2855 drivers/net/wireless/cisco/airo.c set_bit(FLAG_FLASHING, &ai->flags); ai 2864 drivers/net/wireless/cisco/airo.c ai->wifidev = init_wifidev(ai, dev); ai 2865 drivers/net/wireless/cisco/airo.c if (!ai->wifidev) ai 2868 drivers/net/wireless/cisco/airo.c rc = readCapabilityRid(ai, &cap_rid, 1); ai 2874 drivers/net/wireless/cisco/airo.c ai->wep_capable = (cap_rid.softCap & cpu_to_le16(0x02)) ? 1 : 0; ai 2875 drivers/net/wireless/cisco/airo.c ai->max_wep_idx = (cap_rid.softCap & cpu_to_le16(0x80)) ? 3 : 0; ai 2887 drivers/net/wireless/cisco/airo.c airo_print_info(ai->dev->name, "WPA supported."); ai 2889 drivers/net/wireless/cisco/airo.c set_bit(FLAG_WPA_CAPABLE, &ai->flags); ai 2890 drivers/net/wireless/cisco/airo.c ai->bssListFirst = RID_WPA_BSSLISTFIRST; ai 2891 drivers/net/wireless/cisco/airo.c ai->bssListNext = RID_WPA_BSSLISTNEXT; ai 2892 drivers/net/wireless/cisco/airo.c ai->bssListRidLen = sizeof(BSSListRid); ai 2894 drivers/net/wireless/cisco/airo.c airo_print_info(ai->dev->name, "WPA unsupported with firmware " ai 2897 drivers/net/wireless/cisco/airo.c ai->bssListFirst = RID_BSSLISTFIRST; ai 2898 drivers/net/wireless/cisco/airo.c ai->bssListNext = RID_BSSLISTNEXT; ai 2899 drivers/net/wireless/cisco/airo.c ai->bssListRidLen = sizeof(BSSListRid) - sizeof(BSSListRidExtra); ai 2902 drivers/net/wireless/cisco/airo.c set_bit(FLAG_REGISTERED,&ai->flags); ai 2906 drivers/net/wireless/cisco/airo.c if (probe && !test_bit(FLAG_MPI,&ai->flags)) ai 2908 drivers/net/wireless/cisco/airo.c ai->fids[i] = transmit_allocate(ai,AIRO_DEF_MTU,i>=MAX_FIDS/2); ai 2916 drivers/net/wireless/cisco/airo.c unregister_netdev(ai->wifidev); ai 2917 drivers/net/wireless/cisco/airo.c free_netdev(ai->wifidev); ai 2921 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI,&ai->flags) && pci) { ai 2922 drivers/net/wireless/cisco/airo.c pci_free_consistent(pci, PCI_SHARED_LEN, ai->shared, ai->shared_dma); ai 2923 drivers/net/wireless/cisco/airo.c iounmap(ai->pciaux); ai 2924 drivers/net/wireless/cisco/airo.c iounmap(ai->pcimem); ai 2925 drivers/net/wireless/cisco/airo.c mpi_unmap_card(ai->pci); ai 2931 drivers/net/wireless/cisco/airo.c airo_networks_free(ai); ai 2933 drivers/net/wireless/cisco/airo.c del_airo_dev(ai); ai 2946 drivers/net/wireless/cisco/airo.c static int waitbusy (struct airo_info *ai) { ai 2948 drivers/net/wireless/cisco/airo.c while ((IN4500(ai, COMMAND) & COMMAND_BUSY) && (delay < 10000)) { ai 2951 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); ai 2959 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 2964 drivers/net/wireless/cisco/airo.c if ( setup_card(ai, dev->dev_addr, 1 ) != SUCCESS ) { ai 2970 drivers/net/wireless/cisco/airo.c if (!test_bit(FLAG_MPI,&ai->flags)) ai 2972 drivers/net/wireless/cisco/airo.c ai->fids[i] = transmit_allocate (ai,AIRO_DEF_MTU,i>=MAX_FIDS/2); ai 2974 drivers/net/wireless/cisco/airo.c enable_interrupts( ai ); ai 2982 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 2986 drivers/net/wireless/cisco/airo.c clear_bit(JOB_EVENT, &ai->jobs); ai 2987 drivers/net/wireless/cisco/airo.c PC4500_readrid(ai, RID_STATUS, &status_rid, sizeof(status_rid), 0); ai 2988 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 2998 drivers/net/wireless/cisco/airo.c static void airo_process_scan_results (struct airo_info *ai) { ai 3006 drivers/net/wireless/cisco/airo.c list_for_each_entry_safe (loop_net, tmp_net, &ai->network_list, list) { ai 3007 drivers/net/wireless/cisco/airo.c list_move_tail (&loop_net->list, &ai->network_free_list); ai 3013 drivers/net/wireless/cisco/airo.c rc = PC4500_readrid(ai, ai->bssListFirst, &bss, ai->bssListRidLen, 0); ai 3023 drivers/net/wireless/cisco/airo.c if (!list_empty(&ai->network_free_list)) { ai 3024 drivers/net/wireless/cisco/airo.c tmp_net = list_entry(ai->network_free_list.next, ai 3026 drivers/net/wireless/cisco/airo.c list_del(ai->network_free_list.next); ai 3031 drivers/net/wireless/cisco/airo.c list_add_tail(&tmp_net->list, &ai->network_list); ai 3036 drivers/net/wireless/cisco/airo.c rc = PC4500_readrid(ai, ai->bssListNext, ai 3037 drivers/net/wireless/cisco/airo.c &bss, ai->bssListRidLen, 0); ai 3042 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 2); ai 3043 drivers/net/wireless/cisco/airo.c writeAPListRid(ai, &ai->APList, 0); ai 3044 drivers/net/wireless/cisco/airo.c enable_MAC(ai, 0); ai 3046 drivers/net/wireless/cisco/airo.c ai->scan_timeout = 0; ai 3047 drivers/net/wireless/cisco/airo.c clear_bit(JOB_SCAN_RESULTS, &ai->jobs); ai 3048 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 3059 drivers/net/wireless/cisco/airo.c wireless_send_event(ai->dev, SIOCGIWSCAN, &wrqu, NULL); ai 3064 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 3072 drivers/net/wireless/cisco/airo.c if (test_bit(JOB_DIE, &ai->jobs)) ai 3075 drivers/net/wireless/cisco/airo.c if (ai->jobs) { ai 3076 drivers/net/wireless/cisco/airo.c locked = down_interruptible(&ai->sem); ai 3081 drivers/net/wireless/cisco/airo.c add_wait_queue(&ai->thr_wait, &wait); ai 3084 drivers/net/wireless/cisco/airo.c if (ai->jobs) ai 3086 drivers/net/wireless/cisco/airo.c if (ai->expires || ai->scan_timeout) { ai 3087 drivers/net/wireless/cisco/airo.c if (ai->scan_timeout && ai 3088 drivers/net/wireless/cisco/airo.c time_after_eq(jiffies,ai->scan_timeout)){ ai 3089 drivers/net/wireless/cisco/airo.c set_bit(JOB_SCAN_RESULTS, &ai->jobs); ai 3091 drivers/net/wireless/cisco/airo.c } else if (ai->expires && ai 3092 drivers/net/wireless/cisco/airo.c time_after_eq(jiffies,ai->expires)){ ai 3093 drivers/net/wireless/cisco/airo.c set_bit(JOB_AUTOWEP, &ai->jobs); ai 3099 drivers/net/wireless/cisco/airo.c if (!ai->expires || !ai->scan_timeout) { ai 3100 drivers/net/wireless/cisco/airo.c wake_at = max(ai->expires, ai 3101 drivers/net/wireless/cisco/airo.c ai->scan_timeout); ai 3103 drivers/net/wireless/cisco/airo.c wake_at = min(ai->expires, ai 3104 drivers/net/wireless/cisco/airo.c ai->scan_timeout); ai 3117 drivers/net/wireless/cisco/airo.c remove_wait_queue(&ai->thr_wait, &wait); ai 3124 drivers/net/wireless/cisco/airo.c if (test_bit(JOB_DIE, &ai->jobs)) { ai 3125 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 3129 drivers/net/wireless/cisco/airo.c if (ai->power.event || test_bit(FLAG_FLASHING, &ai->flags)) { ai 3130 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 3134 drivers/net/wireless/cisco/airo.c if (test_bit(JOB_XMIT, &ai->jobs)) ai 3136 drivers/net/wireless/cisco/airo.c else if (test_bit(JOB_XMIT11, &ai->jobs)) ai 3138 drivers/net/wireless/cisco/airo.c else if (test_bit(JOB_STATS, &ai->jobs)) ai 3140 drivers/net/wireless/cisco/airo.c else if (test_bit(JOB_WSTATS, &ai->jobs)) ai 3141 drivers/net/wireless/cisco/airo.c airo_read_wireless_stats(ai); ai 3142 drivers/net/wireless/cisco/airo.c else if (test_bit(JOB_PROMISC, &ai->jobs)) ai 3143 drivers/net/wireless/cisco/airo.c airo_set_promisc(ai); ai 3144 drivers/net/wireless/cisco/airo.c else if (test_bit(JOB_MIC, &ai->jobs)) ai 3145 drivers/net/wireless/cisco/airo.c micinit(ai); ai 3146 drivers/net/wireless/cisco/airo.c else if (test_bit(JOB_EVENT, &ai->jobs)) ai 3148 drivers/net/wireless/cisco/airo.c else if (test_bit(JOB_AUTOWEP, &ai->jobs)) ai 3150 drivers/net/wireless/cisco/airo.c else if (test_bit(JOB_SCAN_RESULTS, &ai->jobs)) ai 3151 drivers/net/wireless/cisco/airo.c airo_process_scan_results(ai); ai 3153 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 3174 drivers/net/wireless/cisco/airo.c static void airo_handle_cisco_mic(struct airo_info *ai) ai 3176 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MIC_CAPABLE, &ai->flags)) { ai 3177 drivers/net/wireless/cisco/airo.c set_bit(JOB_MIC, &ai->jobs); ai 3178 drivers/net/wireless/cisco/airo.c wake_up_interruptible(&ai->thr_wait); ai 3243 drivers/net/wireless/cisco/airo.c static void airo_handle_link(struct airo_info *ai) ai 3250 drivers/net/wireless/cisco/airo.c status = le16_to_cpu(IN4500(ai, LINKSTAT)); ai 3251 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_LINK); ai 3253 drivers/net/wireless/cisco/airo.c if ((status == STAT_FORCELOSS) && (ai->scan_timeout > 0)) ai 3256 drivers/net/wireless/cisco/airo.c airo_print_status(ai->dev->name, status); ai 3260 drivers/net/wireless/cisco/airo.c ai->expires = 0; ai 3261 drivers/net/wireless/cisco/airo.c if (ai->list_bss_task) ai 3262 drivers/net/wireless/cisco/airo.c wake_up_process(ai->list_bss_task); ai 3263 drivers/net/wireless/cisco/airo.c set_bit(FLAG_UPDATE_UNI, &ai->flags); ai 3264 drivers/net/wireless/cisco/airo.c set_bit(FLAG_UPDATE_MULTI, &ai->flags); ai 3266 drivers/net/wireless/cisco/airo.c if (down_trylock(&ai->sem) != 0) { ai 3267 drivers/net/wireless/cisco/airo.c set_bit(JOB_EVENT, &ai->jobs); ai 3268 drivers/net/wireless/cisco/airo.c wake_up_interruptible(&ai->thr_wait); ai 3270 drivers/net/wireless/cisco/airo.c airo_send_event(ai->dev); ai 3271 drivers/net/wireless/cisco/airo.c netif_carrier_on(ai->dev); ai 3273 drivers/net/wireless/cisco/airo.c if (auto_wep && !ai->expires) { ai 3274 drivers/net/wireless/cisco/airo.c ai->expires = RUN_AT(3*HZ); ai 3275 drivers/net/wireless/cisco/airo.c wake_up_interruptible(&ai->thr_wait); ai 3281 drivers/net/wireless/cisco/airo.c wireless_send_event(ai->dev, SIOCGIWAP, &wrqu, NULL); ai 3282 drivers/net/wireless/cisco/airo.c netif_carrier_off(ai->dev); ai 3284 drivers/net/wireless/cisco/airo.c netif_carrier_off(ai->dev); ai 3288 drivers/net/wireless/cisco/airo.c static void airo_handle_rx(struct airo_info *ai) ai 3296 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI, &ai->flags)) { ai 3297 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_802_11, &ai->flags)) ai 3298 drivers/net/wireless/cisco/airo.c mpi_receive_802_11(ai); ai 3300 drivers/net/wireless/cisco/airo.c mpi_receive_802_3(ai); ai 3301 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_RX); ai 3305 drivers/net/wireless/cisco/airo.c fid = IN4500(ai, RXFID); ai 3308 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_802_11, &ai->flags)) { ai 3309 drivers/net/wireless/cisco/airo.c bap_setup (ai, fid, 4, BAP0); ai 3310 drivers/net/wireless/cisco/airo.c bap_read (ai, (__le16*)&hdr, sizeof(hdr), BAP0); ai 3314 drivers/net/wireless/cisco/airo.c if (ai->wifidev == NULL) ai 3317 drivers/net/wireless/cisco/airo.c bap_setup(ai, fid, 0x36, BAP0); ai 3318 drivers/net/wireless/cisco/airo.c bap_read(ai, &hdr.len, 2, BAP0); ai 3323 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "Bad size %d", len); ai 3329 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_802_11, &ai->flags)) { ai 3330 drivers/net/wireless/cisco/airo.c bap_read(ai, &fc, sizeof (fc), BAP0); ai 3337 drivers/net/wireless/cisco/airo.c ai->dev->stats.rx_dropped++; ai 3343 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_802_11, &ai->flags)) { ai 3345 drivers/net/wireless/cisco/airo.c bap_read(ai, buffer + 1, hdrlen - 2, BAP0); ai 3347 drivers/net/wireless/cisco/airo.c bap_read(ai, tmpbuf, 6, BAP0); ai 3349 drivers/net/wireless/cisco/airo.c bap_read(ai, &v, sizeof(v), BAP0); ai 3353 drivers/net/wireless/cisco/airo.c bap_read(ai, tmpbuf, gap, BAP0); ai 3355 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "gaplen too " ai 3359 drivers/net/wireless/cisco/airo.c bap_read(ai, buffer + hdrlen/2, len, BAP0); ai 3363 drivers/net/wireless/cisco/airo.c bap_read(ai, buffer, ETH_ALEN * 2, BAP0); ai 3364 drivers/net/wireless/cisco/airo.c if (ai->micstats.enabled) { ai 3365 drivers/net/wireless/cisco/airo.c bap_read(ai, (__le16 *) &micbuf, sizeof (micbuf), BAP0); ai 3367 drivers/net/wireless/cisco/airo.c bap_setup(ai, fid, 0x44, BAP0); ai 3379 drivers/net/wireless/cisco/airo.c bap_read(ai, buffer + ETH_ALEN, len, BAP0); ai 3380 drivers/net/wireless/cisco/airo.c if (decapsulate(ai, &micbuf, (etherHead*) buffer, len)) ai 3387 drivers/net/wireless/cisco/airo.c if (success && (ai->spy_data.spy_number > 0)) { ai 3392 drivers/net/wireless/cisco/airo.c if (!test_bit(FLAG_802_11, &ai->flags)) { ai 3394 drivers/net/wireless/cisco/airo.c bap_setup(ai, fid, 8, BAP0); ai 3395 drivers/net/wireless/cisco/airo.c bap_read(ai, (__le16 *) hdr.rssi, 2, BAP0); ai 3399 drivers/net/wireless/cisco/airo.c if (ai->rssi) ai 3400 drivers/net/wireless/cisco/airo.c wstats.level = 0x100 - ai->rssi[hdr.rssi[1]].rssidBm; ai 3403 drivers/net/wireless/cisco/airo.c wstats.noise = ai->wstats.qual.noise; ai 3408 drivers/net/wireless/cisco/airo.c wireless_spy_update(ai->dev, sa, &wstats); ai 3413 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_RX); ai 3416 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_802_11, &ai->flags)) { ai 3419 drivers/net/wireless/cisco/airo.c skb->dev = ai->wifidev; ai 3422 drivers/net/wireless/cisco/airo.c skb->protocol = eth_type_trans(skb, ai->dev); ai 3429 drivers/net/wireless/cisco/airo.c static void airo_handle_tx(struct airo_info *ai, u16 status) ai 3434 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI, &ai->flags)) { ai 3438 drivers/net/wireless/cisco/airo.c get_tx_error(ai, -1); ai 3440 drivers/net/wireless/cisco/airo.c spin_lock_irqsave(&ai->aux_lock, flags); ai 3441 drivers/net/wireless/cisco/airo.c if (!skb_queue_empty(&ai->txq)) { ai 3442 drivers/net/wireless/cisco/airo.c spin_unlock_irqrestore(&ai->aux_lock,flags); ai 3443 drivers/net/wireless/cisco/airo.c mpi_send_packet(ai->dev); ai 3445 drivers/net/wireless/cisco/airo.c clear_bit(FLAG_PENDING_XMIT, &ai->flags); ai 3446 drivers/net/wireless/cisco/airo.c spin_unlock_irqrestore(&ai->aux_lock,flags); ai 3447 drivers/net/wireless/cisco/airo.c netif_wake_queue(ai->dev); ai 3449 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, status & (EV_TX | EV_TXCPY | EV_TXEXC)); ai 3453 drivers/net/wireless/cisco/airo.c fid = IN4500(ai, TXCOMPLFID); ai 3456 drivers/net/wireless/cisco/airo.c if ((ai->fids[i] & 0xffff) == fid) ai 3462 drivers/net/wireless/cisco/airo.c get_tx_error(ai, index); ai 3464 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, status & (EV_TX | EV_TXEXC)); ai 3467 drivers/net/wireless/cisco/airo.c ai->fids[index] &= 0xffff; ai 3469 drivers/net/wireless/cisco/airo.c if (!test_bit(FLAG_PENDING_XMIT, &ai->flags)) ai 3470 drivers/net/wireless/cisco/airo.c netif_wake_queue(ai->dev); ai 3472 drivers/net/wireless/cisco/airo.c if (!test_bit(FLAG_PENDING_XMIT11, &ai->flags)) ai 3473 drivers/net/wireless/cisco/airo.c netif_wake_queue(ai->wifidev); ai 3476 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, status & (EV_TX | EV_TXCPY | EV_TXEXC)); ai 3477 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "Unallocated FID was used to xmit"); ai 3485 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 3492 drivers/net/wireless/cisco/airo.c status = IN4500(ai, EVSTAT); ai 3499 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_AWAKE); ai 3500 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_AWAKE); ai 3504 drivers/net/wireless/cisco/airo.c savedInterrupts = IN4500(ai, EVINTEN); ai 3505 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVINTEN, 0); ai 3509 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_MIC); ai 3510 drivers/net/wireless/cisco/airo.c airo_handle_cisco_mic(ai); ai 3515 drivers/net/wireless/cisco/airo.c airo_handle_link(ai); ai 3520 drivers/net/wireless/cisco/airo.c airo_handle_rx(ai); ai 3524 drivers/net/wireless/cisco/airo.c airo_handle_tx(ai, status); ai 3527 drivers/net/wireless/cisco/airo.c airo_print_warn(ai->dev->name, "Got weird status %x", ai 3533 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVINTEN, savedInterrupts); ai 3547 drivers/net/wireless/cisco/airo.c static void OUT4500( struct airo_info *ai, u16 reg, u16 val ) { ai 3548 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI,&ai->flags)) ai 3551 drivers/net/wireless/cisco/airo.c outw( val, ai->dev->base_addr + reg ); ai 3553 drivers/net/wireless/cisco/airo.c outb( val & 0xff, ai->dev->base_addr + reg ); ai 3554 drivers/net/wireless/cisco/airo.c outb( val >> 8, ai->dev->base_addr + reg + 1 ); ai 3558 drivers/net/wireless/cisco/airo.c static u16 IN4500( struct airo_info *ai, u16 reg ) { ai 3561 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI,&ai->flags)) ai 3564 drivers/net/wireless/cisco/airo.c rc = inw( ai->dev->base_addr + reg ); ai 3566 drivers/net/wireless/cisco/airo.c rc = inb( ai->dev->base_addr + reg ); ai 3567 drivers/net/wireless/cisco/airo.c rc += ((int)inb( ai->dev->base_addr + reg + 1 )) << 8; ai 3572 drivers/net/wireless/cisco/airo.c static int enable_MAC(struct airo_info *ai, int lock) ai 3584 drivers/net/wireless/cisco/airo.c if (ai->flags & FLAG_RADIO_MASK) return SUCCESS; ai 3586 drivers/net/wireless/cisco/airo.c if (lock && down_interruptible(&ai->sem)) ai 3589 drivers/net/wireless/cisco/airo.c if (!test_bit(FLAG_ENABLED, &ai->flags)) { ai 3592 drivers/net/wireless/cisco/airo.c rc = issuecommand(ai, &cmd, &rsp); ai 3594 drivers/net/wireless/cisco/airo.c set_bit(FLAG_ENABLED, &ai->flags); ai 3599 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 3602 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "Cannot enable MAC"); ai 3604 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "Bad MAC enable reason=%x, " ai 3611 drivers/net/wireless/cisco/airo.c static void disable_MAC( struct airo_info *ai, int lock ) { ai 3615 drivers/net/wireless/cisco/airo.c if (lock == 1 && down_interruptible(&ai->sem)) ai 3618 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_ENABLED, &ai->flags)) { ai 3620 drivers/net/wireless/cisco/airo.c netif_carrier_off(ai->dev); ai 3623 drivers/net/wireless/cisco/airo.c issuecommand(ai, &cmd, &rsp); ai 3624 drivers/net/wireless/cisco/airo.c clear_bit(FLAG_ENABLED, &ai->flags); ai 3627 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 3630 drivers/net/wireless/cisco/airo.c static void enable_interrupts( struct airo_info *ai ) { ai 3632 drivers/net/wireless/cisco/airo.c OUT4500( ai, EVINTEN, STATUS_INTS ); ai 3635 drivers/net/wireless/cisco/airo.c static void disable_interrupts( struct airo_info *ai ) { ai 3636 drivers/net/wireless/cisco/airo.c OUT4500( ai, EVINTEN, 0 ); ai 3639 drivers/net/wireless/cisco/airo.c static void mpi_receive_802_3(struct airo_info *ai) ai 3648 drivers/net/wireless/cisco/airo.c memcpy_fromio(&rxd, ai->rxfids[0].card_ram_off, sizeof(rxd)); ai 3657 drivers/net/wireless/cisco/airo.c ai->dev->stats.rx_dropped++; ai 3661 drivers/net/wireless/cisco/airo.c memcpy(buffer, ai->rxfids[0].virtual_host_addr, ETH_ALEN * 2); ai 3662 drivers/net/wireless/cisco/airo.c if (ai->micstats.enabled) { ai 3664 drivers/net/wireless/cisco/airo.c ai->rxfids[0].virtual_host_addr + ETH_ALEN * 2, ai 3675 drivers/net/wireless/cisco/airo.c ai->rxfids[0].virtual_host_addr + ETH_ALEN * 2 + off, ai 3677 drivers/net/wireless/cisco/airo.c if (decapsulate (ai, &micbuf, (etherHead*)buffer, len - off - ETH_ALEN * 2)) { ai 3683 drivers/net/wireless/cisco/airo.c if (ai->spy_data.spy_number > 0) { ai 3692 drivers/net/wireless/cisco/airo.c wireless_spy_update(ai->dev, sa, &wstats); ai 3697 drivers/net/wireless/cisco/airo.c skb->protocol = eth_type_trans(skb, ai->dev); ai 3705 drivers/net/wireless/cisco/airo.c memcpy_toio(ai->rxfids[0].card_ram_off, &rxd, sizeof(rxd)); ai 3709 drivers/net/wireless/cisco/airo.c static void mpi_receive_802_11(struct airo_info *ai) ai 3718 drivers/net/wireless/cisco/airo.c char *ptr = ai->rxfids[0].virtual_host_addr + 4; ai 3720 drivers/net/wireless/cisco/airo.c memcpy_fromio(&rxd, ai->rxfids[0].card_ram_off, sizeof(rxd)); ai 3726 drivers/net/wireless/cisco/airo.c if (ai->wifidev == NULL) ai 3730 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "Bad size %d", len); ai 3741 drivers/net/wireless/cisco/airo.c ai->dev->stats.rx_dropped++; ai 3755 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, ai 3761 drivers/net/wireless/cisco/airo.c if (ai->spy_data.spy_number > 0) { ai 3767 drivers/net/wireless/cisco/airo.c if (ai->rssi) ai 3768 drivers/net/wireless/cisco/airo.c wstats.level = 0x100 - ai->rssi[hdr.rssi[1]].rssidBm; ai 3771 drivers/net/wireless/cisco/airo.c wstats.noise = ai->wstats.qual.noise; ai 3776 drivers/net/wireless/cisco/airo.c wireless_spy_update(ai->dev, sa, &wstats); ai 3781 drivers/net/wireless/cisco/airo.c skb->dev = ai->wifidev; ai 3791 drivers/net/wireless/cisco/airo.c memcpy_toio(ai->rxfids[0].card_ram_off, &rxd, sizeof(rxd)); ai 3805 drivers/net/wireless/cisco/airo.c static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) ai 3816 drivers/net/wireless/cisco/airo.c kfree (ai->flash); ai 3817 drivers/net/wireless/cisco/airo.c ai->flash = NULL; ai 3822 drivers/net/wireless/cisco/airo.c if (lock && down_interruptible(&ai->sem)) ai 3824 drivers/net/wireless/cisco/airo.c if ( issuecommand( ai, &cmd, &rsp ) != SUCCESS ) { ai 3826 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 3829 drivers/net/wireless/cisco/airo.c disable_MAC( ai, 0); ai 3832 drivers/net/wireless/cisco/airo.c if (!test_bit(FLAG_MPI,&ai->flags)) { ai 3834 drivers/net/wireless/cisco/airo.c if (issuecommand(ai, &cmd, &rsp) != SUCCESS) { ai 3836 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 3837 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "Error checking for AUX port"); ai 3841 drivers/net/wireless/cisco/airo.c ai->bap_read = fast_bap_read; ai 3842 drivers/net/wireless/cisco/airo.c airo_print_dbg(ai->dev->name, "Doing fast bap_reads"); ai 3844 drivers/net/wireless/cisco/airo.c ai->bap_read = aux_bap_read; ai 3845 drivers/net/wireless/cisco/airo.c airo_print_dbg(ai->dev->name, "Doing AUX bap_reads"); ai 3849 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 3850 drivers/net/wireless/cisco/airo.c if (ai->config.len == 0) { ai 3855 drivers/net/wireless/cisco/airo.c kfree(ai->SSID); ai 3856 drivers/net/wireless/cisco/airo.c ai->SSID = NULL; ai 3858 drivers/net/wireless/cisco/airo.c status = readConfigRid(ai, lock); ai 3861 drivers/net/wireless/cisco/airo.c status = readCapabilityRid(ai, &cap_rid, lock); ai 3864 drivers/net/wireless/cisco/airo.c status = PC4500_readrid(ai,RID_RSSI,&rssi_rid,sizeof(rssi_rid),lock); ai 3866 drivers/net/wireless/cisco/airo.c if (ai->rssi || (ai->rssi = kmalloc(512, GFP_KERNEL)) != NULL) ai 3867 drivers/net/wireless/cisco/airo.c memcpy(ai->rssi, (u8*)&rssi_rid + 2, 512); /* Skip RID length member */ ai 3870 drivers/net/wireless/cisco/airo.c kfree(ai->rssi); ai 3871 drivers/net/wireless/cisco/airo.c ai->rssi = NULL; ai 3873 drivers/net/wireless/cisco/airo.c ai->config.rmode |= RXMODE_NORMALIZED_RSSI; ai 3875 drivers/net/wireless/cisco/airo.c airo_print_warn(ai->dev->name, "unknown received signal " ai 3878 drivers/net/wireless/cisco/airo.c ai->config.opmode = adhoc ? MODE_STA_IBSS : MODE_STA_ESS; ai 3879 drivers/net/wireless/cisco/airo.c set_auth_type(ai, AUTH_OPEN); ai 3880 drivers/net/wireless/cisco/airo.c ai->config.modulation = MOD_CCK; ai 3884 drivers/net/wireless/cisco/airo.c micsetup(ai) == SUCCESS) { ai 3885 drivers/net/wireless/cisco/airo.c ai->config.opmode |= MODE_MIC; ai 3886 drivers/net/wireless/cisco/airo.c set_bit(FLAG_MIC_CAPABLE, &ai->flags); ai 3891 drivers/net/wireless/cisco/airo.c mac[i] = ai->config.macAddr[i]; ai 3897 drivers/net/wireless/cisco/airo.c memset(ai->config.rates,0,sizeof(ai->config.rates)); ai 3899 drivers/net/wireless/cisco/airo.c ai->config.rates[i] = rates[i]; ai 3902 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 3918 drivers/net/wireless/cisco/airo.c status = writeConfigRid(ai, lock); ai 3923 drivers/net/wireless/cisco/airo.c status = writeSsidRid(ai, &mySsid, lock); ai 3927 drivers/net/wireless/cisco/airo.c status = enable_MAC(ai, lock); ai 3932 drivers/net/wireless/cisco/airo.c rc = readWepKeyRid(ai, &wkr, 1, lock); ai 3936 drivers/net/wireless/cisco/airo.c ai->defindex = wkr.mac[0]; ai 3938 drivers/net/wireless/cisco/airo.c rc = readWepKeyRid(ai, &wkr, 0, lock); ai 3941 drivers/net/wireless/cisco/airo.c try_auto_wep(ai); ai 3946 drivers/net/wireless/cisco/airo.c static u16 issuecommand(struct airo_info *ai, Cmd *pCmd, Resp *pRsp) { ai 3950 drivers/net/wireless/cisco/airo.c if (IN4500(ai, EVSTAT) & EV_CMD) ai 3951 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_CMD); ai 3953 drivers/net/wireless/cisco/airo.c OUT4500(ai, PARAM0, pCmd->parm0); ai 3954 drivers/net/wireless/cisco/airo.c OUT4500(ai, PARAM1, pCmd->parm1); ai 3955 drivers/net/wireless/cisco/airo.c OUT4500(ai, PARAM2, pCmd->parm2); ai 3956 drivers/net/wireless/cisco/airo.c OUT4500(ai, COMMAND, pCmd->cmd); ai 3958 drivers/net/wireless/cisco/airo.c while (max_tries-- && (IN4500(ai, EVSTAT) & EV_CMD) == 0) { ai 3959 drivers/net/wireless/cisco/airo.c if ((IN4500(ai, COMMAND)) == pCmd->cmd) ai 3961 drivers/net/wireless/cisco/airo.c OUT4500(ai, COMMAND, pCmd->cmd); ai 3967 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, ai 3969 drivers/net/wireless/cisco/airo.c if (IN4500(ai, COMMAND) & COMMAND_BUSY) ai 3970 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); ai 3975 drivers/net/wireless/cisco/airo.c pRsp->status = IN4500(ai, STATUS); ai 3976 drivers/net/wireless/cisco/airo.c pRsp->rsp0 = IN4500(ai, RESP0); ai 3977 drivers/net/wireless/cisco/airo.c pRsp->rsp1 = IN4500(ai, RESP1); ai 3978 drivers/net/wireless/cisco/airo.c pRsp->rsp2 = IN4500(ai, RESP2); ai 3980 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, ai 3986 drivers/net/wireless/cisco/airo.c if (IN4500(ai, COMMAND) & COMMAND_BUSY) { ai 3987 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); ai 3990 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_CMD); ai 3998 drivers/net/wireless/cisco/airo.c static int bap_setup(struct airo_info *ai, u16 rid, u16 offset, int whichbap ) ai 4003 drivers/net/wireless/cisco/airo.c OUT4500(ai, SELECT0+whichbap, rid); ai 4004 drivers/net/wireless/cisco/airo.c OUT4500(ai, OFFSET0+whichbap, offset); ai 4006 drivers/net/wireless/cisco/airo.c int status = IN4500(ai, OFFSET0+whichbap); ai 4015 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "BAP error %x %d", ai 4022 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, ai 4027 drivers/net/wireless/cisco/airo.c OUT4500(ai, SELECT0+whichbap, rid); ai 4028 drivers/net/wireless/cisco/airo.c OUT4500(ai, OFFSET0+whichbap, offset); ai 4036 drivers/net/wireless/cisco/airo.c static u16 aux_setup(struct airo_info *ai, u16 page, ai 4041 drivers/net/wireless/cisco/airo.c OUT4500(ai, AUXPAGE, page); ai 4042 drivers/net/wireless/cisco/airo.c OUT4500(ai, AUXOFF, 0); ai 4043 drivers/net/wireless/cisco/airo.c next = IN4500(ai, AUXDATA); ai 4044 drivers/net/wireless/cisco/airo.c *len = IN4500(ai, AUXDATA)&0xff; ai 4045 drivers/net/wireless/cisco/airo.c if (offset != 4) OUT4500(ai, AUXOFF, offset); ai 4050 drivers/net/wireless/cisco/airo.c static int aux_bap_read(struct airo_info *ai, __le16 *pu16Dst, ai 4061 drivers/net/wireless/cisco/airo.c spin_lock_irqsave(&ai->aux_lock, flags); ai 4062 drivers/net/wireless/cisco/airo.c page = IN4500(ai, SWS0+whichbap); ai 4063 drivers/net/wireless/cisco/airo.c offset = IN4500(ai, SWS2+whichbap); ai 4064 drivers/net/wireless/cisco/airo.c next = aux_setup(ai, page, offset, &len); ai 4071 drivers/net/wireless/cisco/airo.c insw( ai->dev->base_addr+DATA0+whichbap, ai 4074 drivers/net/wireless/cisco/airo.c insb( ai->dev->base_addr+DATA0+whichbap, ai 4078 drivers/net/wireless/cisco/airo.c next = aux_setup(ai, next, 4, &len); ai 4081 drivers/net/wireless/cisco/airo.c spin_unlock_irqrestore(&ai->aux_lock, flags); ai 4087 drivers/net/wireless/cisco/airo.c static int fast_bap_read(struct airo_info *ai, __le16 *pu16Dst, ai 4092 drivers/net/wireless/cisco/airo.c insw( ai->dev->base_addr+DATA0+whichbap, pu16Dst, bytelen>>1 ); ai 4094 drivers/net/wireless/cisco/airo.c insb( ai->dev->base_addr+DATA0+whichbap, pu16Dst, bytelen ); ai 4099 drivers/net/wireless/cisco/airo.c static int bap_write(struct airo_info *ai, const __le16 *pu16Src, ai 4104 drivers/net/wireless/cisco/airo.c outsw( ai->dev->base_addr+DATA0+whichbap, ai 4107 drivers/net/wireless/cisco/airo.c outsb( ai->dev->base_addr+DATA0+whichbap, pu16Src, bytelen ); ai 4111 drivers/net/wireless/cisco/airo.c static int PC4500_accessrid(struct airo_info *ai, u16 rid, u16 accmd) ai 4120 drivers/net/wireless/cisco/airo.c status = issuecommand(ai, &cmd, &rsp); ai 4130 drivers/net/wireless/cisco/airo.c static int PC4500_readrid(struct airo_info *ai, u16 rid, void *pBuf, int len, int lock) ai 4136 drivers/net/wireless/cisco/airo.c if (down_interruptible(&ai->sem)) ai 4139 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI,&ai->flags)) { ai 4145 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.valid = 1; ai 4146 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.len = RIDSIZE; ai 4147 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.rid = 0; ai 4148 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.host_addr = ai->ridbus; ai 4153 drivers/net/wireless/cisco/airo.c memcpy_toio(ai->config_desc.card_ram_off, ai 4154 drivers/net/wireless/cisco/airo.c &ai->config_desc.rid_desc, sizeof(Rid)); ai 4156 drivers/net/wireless/cisco/airo.c rc = issuecommand(ai, &cmd, &rsp); ai 4161 drivers/net/wireless/cisco/airo.c memcpy(pBuf, ai->config_desc.virtual_host_addr, len); ai 4164 drivers/net/wireless/cisco/airo.c if ((status = PC4500_accessrid(ai, rid, CMD_ACCESS))!=SUCCESS) { ai 4168 drivers/net/wireless/cisco/airo.c if (bap_setup(ai, rid, 0, BAP1) != SUCCESS) { ai 4173 drivers/net/wireless/cisco/airo.c bap_read(ai, pBuf, 2, BAP1); ai 4178 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, ai 4185 drivers/net/wireless/cisco/airo.c rc = bap_read(ai, ((__le16*)pBuf)+1, len, BAP1); ai 4189 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 4195 drivers/net/wireless/cisco/airo.c static int PC4500_writerid(struct airo_info *ai, u16 rid, ai 4204 drivers/net/wireless/cisco/airo.c if (down_interruptible(&ai->sem)) ai 4207 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI,&ai->flags)) { ai 4211 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_ENABLED, &ai->flags) && (RID_WEP_TEMP != rid)) ai 4212 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, ai 4218 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.valid = 1; ai 4219 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.len = *((u16 *)pBuf); ai 4220 drivers/net/wireless/cisco/airo.c ai->config_desc.rid_desc.rid = 0; ai 4225 drivers/net/wireless/cisco/airo.c memcpy_toio(ai->config_desc.card_ram_off, ai 4226 drivers/net/wireless/cisco/airo.c &ai->config_desc.rid_desc, sizeof(Rid)); ai 4229 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "%s: len=%d", __func__, len); ai 4232 drivers/net/wireless/cisco/airo.c memcpy(ai->config_desc.virtual_host_addr, ai 4235 drivers/net/wireless/cisco/airo.c rc = issuecommand(ai, &cmd, &rsp); ai 4237 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "%s: Write rid Error %d", ai 4239 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "%s: Cmd=%04x", ai 4248 drivers/net/wireless/cisco/airo.c if ( (status = PC4500_accessrid(ai, rid, CMD_ACCESS)) != 0) { ai 4253 drivers/net/wireless/cisco/airo.c if (bap_setup(ai, rid, 0, BAP1) != SUCCESS) { ai 4257 drivers/net/wireless/cisco/airo.c bap_write(ai, pBuf, len, BAP1); ai 4259 drivers/net/wireless/cisco/airo.c rc = PC4500_accessrid(ai, rid, 0x100|CMD_ACCESS); ai 4263 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 4269 drivers/net/wireless/cisco/airo.c static u16 transmit_allocate(struct airo_info *ai, int lenPayload, int raw) ai 4279 drivers/net/wireless/cisco/airo.c if (down_interruptible(&ai->sem)) ai 4281 drivers/net/wireless/cisco/airo.c if (issuecommand(ai, &cmd, &rsp) != SUCCESS) { ai 4292 drivers/net/wireless/cisco/airo.c while (((IN4500(ai, EVSTAT) & EV_ALLOC) == 0) && --loop); ai 4299 drivers/net/wireless/cisco/airo.c txFid = IN4500(ai, TXALLOCFID); ai 4300 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_ALLOC); ai 4313 drivers/net/wireless/cisco/airo.c if (bap_setup(ai, txFid, 0x0008, BAP1) != SUCCESS) ai 4316 drivers/net/wireless/cisco/airo.c bap_write(ai, &txControl, sizeof(txControl), BAP1); ai 4319 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 4327 drivers/net/wireless/cisco/airo.c static int transmit_802_3_packet(struct airo_info *ai, int len, char *pPacket) ai 4339 drivers/net/wireless/cisco/airo.c airo_print_warn(ai->dev->name, "Short packet %d", len); ai 4344 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled && ai 4346 drivers/net/wireless/cisco/airo.c if (encapsulate(ai,(etherHead *)pPacket,&pMic,len) != SUCCESS) ai 4352 drivers/net/wireless/cisco/airo.c if (bap_setup(ai, txFid, 0x0036, BAP1) != SUCCESS) return ERROR; ai 4356 drivers/net/wireless/cisco/airo.c bap_write(ai, &payloadLen, sizeof(payloadLen),BAP1); ai 4357 drivers/net/wireless/cisco/airo.c bap_write(ai, (__le16*)pPacket, sizeof(etherHead), BAP1); ai 4359 drivers/net/wireless/cisco/airo.c bap_write(ai, (__le16*)&pMic, miclen, BAP1); ai 4360 drivers/net/wireless/cisco/airo.c bap_write(ai, (__le16*)(pPacket + sizeof(etherHead)), len, BAP1); ai 4365 drivers/net/wireless/cisco/airo.c if (issuecommand(ai, &cmd, &rsp) != SUCCESS) return ERROR; ai 4370 drivers/net/wireless/cisco/airo.c static int transmit_802_11_packet(struct airo_info *ai, int len, char *pPacket) ai 4385 drivers/net/wireless/cisco/airo.c airo_print_warn(ai->dev->name, "Short packet %d", len); ai 4391 drivers/net/wireless/cisco/airo.c if (bap_setup(ai, txFid, 6, BAP1) != SUCCESS) return ERROR; ai 4395 drivers/net/wireless/cisco/airo.c bap_write(ai, &payloadLen, sizeof(payloadLen),BAP1); ai 4396 drivers/net/wireless/cisco/airo.c if (bap_setup(ai, txFid, 0x0014, BAP1) != SUCCESS) return ERROR; ai 4397 drivers/net/wireless/cisco/airo.c bap_write(ai, (__le16 *)pPacket, hdrlen, BAP1); ai 4398 drivers/net/wireless/cisco/airo.c bap_write(ai, (__le16 *)(tail + (hdrlen - 10)), 38 - hdrlen, BAP1); ai 4400 drivers/net/wireless/cisco/airo.c bap_write(ai, (__le16 *)(pPacket + hdrlen), len - hdrlen, BAP1); ai 4405 drivers/net/wireless/cisco/airo.c if (issuecommand(ai, &cmd, &rsp) != SUCCESS) return ERROR; ai 4784 drivers/net/wireless/cisco/airo.c static inline int sniffing_mode(struct airo_info *ai) ai 4786 drivers/net/wireless/cisco/airo.c return (le16_to_cpu(ai->config.rmode) & le16_to_cpu(RXMODE_MASK)) >= ai 4794 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 4799 drivers/net/wireless/cisco/airo.c readConfigRid(ai, 1); ai 4800 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4807 drivers/net/wireless/cisco/airo.c if (sniffing_mode(ai)) ai 4808 drivers/net/wireless/cisco/airo.c set_bit (FLAG_RESET, &ai->flags); ai 4809 drivers/net/wireless/cisco/airo.c ai->config.rmode &= ~RXMODE_FULL_MASK; ai 4810 drivers/net/wireless/cisco/airo.c clear_bit (FLAG_802_11, &ai->flags); ai 4811 drivers/net/wireless/cisco/airo.c ai->config.opmode &= ~MODE_CFG_MASK; ai 4812 drivers/net/wireless/cisco/airo.c ai->config.scanMode = SCANMODE_ACTIVE; ai 4814 drivers/net/wireless/cisco/airo.c ai->config.opmode |= MODE_STA_IBSS; ai 4816 drivers/net/wireless/cisco/airo.c ai->config.opmode |= MODE_STA_ESS; ai 4818 drivers/net/wireless/cisco/airo.c ai->config.rmode |= RXMODE_RFMON | RXMODE_DISABLE_802_3_HEADER; ai 4819 drivers/net/wireless/cisco/airo.c ai->config.scanMode = SCANMODE_PASSIVE; ai 4820 drivers/net/wireless/cisco/airo.c set_bit (FLAG_802_11, &ai->flags); ai 4822 drivers/net/wireless/cisco/airo.c ai->config.rmode |= RXMODE_RFMON_ANYBSS | RXMODE_DISABLE_802_3_HEADER; ai 4823 drivers/net/wireless/cisco/airo.c ai->config.scanMode = SCANMODE_PASSIVE; ai 4824 drivers/net/wireless/cisco/airo.c set_bit (FLAG_802_11, &ai->flags); ai 4826 drivers/net/wireless/cisco/airo.c ai->config.rmode |= RXMODE_LANMON; ai 4828 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4835 drivers/net/wireless/cisco/airo.c set_bit (FLAG_RADIO_OFF, &ai->flags); ai 4837 drivers/net/wireless/cisco/airo.c clear_bit (FLAG_RADIO_OFF, &ai->flags); ai 4845 drivers/net/wireless/cisco/airo.c memset( ai->config.nodeName, 0, 16 ); ai 4848 drivers/net/wireless/cisco/airo.c ai->config.nodeName[j] = line[j]; ai 4850 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4857 drivers/net/wireless/cisco/airo.c ai->config.powerSaveMode = POWERSAVE_PSPCAM; ai 4858 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4860 drivers/net/wireless/cisco/airo.c ai->config.powerSaveMode = POWERSAVE_PSP; ai 4861 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4863 drivers/net/wireless/cisco/airo.c ai->config.powerSaveMode = POWERSAVE_CAM; ai 4864 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4872 drivers/net/wireless/cisco/airo.c ai->config.rates[k++] = (u8)v; ai 4876 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4882 drivers/net/wireless/cisco/airo.c ai->config.channelSet = cpu_to_le16(v); ai 4883 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4890 drivers/net/wireless/cisco/airo.c ai->config.txPower = cpu_to_le16(v); ai 4891 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4897 drivers/net/wireless/cisco/airo.c set_auth_type(ai, AUTH_SHAREDKEY); ai 4900 drivers/net/wireless/cisco/airo.c set_auth_type(ai, AUTH_ENCRYPT); ai 4903 drivers/net/wireless/cisco/airo.c set_auth_type(ai, AUTH_OPEN); ai 4906 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4913 drivers/net/wireless/cisco/airo.c ai->config.longRetryLimit = cpu_to_le16(v); ai 4914 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4921 drivers/net/wireless/cisco/airo.c ai->config.shortRetryLimit = cpu_to_le16(v); ai 4922 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4929 drivers/net/wireless/cisco/airo.c ai->config.rtsThres = cpu_to_le16(v); ai 4930 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4937 drivers/net/wireless/cisco/airo.c ai->config.txLifetime = cpu_to_le16(v); ai 4938 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4945 drivers/net/wireless/cisco/airo.c ai->config.rxLifetime = cpu_to_le16(v); ai 4946 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4948 drivers/net/wireless/cisco/airo.c ai->config.txDiversity = ai 4951 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4953 drivers/net/wireless/cisco/airo.c ai->config.rxDiversity = ai 4956 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4964 drivers/net/wireless/cisco/airo.c ai->config.fragThresh = cpu_to_le16(v); ai 4965 drivers/net/wireless/cisco/airo.c set_bit (FLAG_COMMIT, &ai->flags); ai 4969 drivers/net/wireless/cisco/airo.c case 'd': ai->config.modulation=MOD_DEFAULT; set_bit(FLAG_COMMIT, &ai->flags); break; ai 4970 drivers/net/wireless/cisco/airo.c case 'c': ai->config.modulation=MOD_CCK; set_bit(FLAG_COMMIT, &ai->flags); break; ai 4971 drivers/net/wireless/cisco/airo.c case 'm': ai->config.modulation=MOD_MOK; set_bit(FLAG_COMMIT, &ai->flags); break; ai 4972 drivers/net/wireless/cisco/airo.c default: airo_print_warn(ai->dev->name, "Unknown modulation"); ai 4977 drivers/net/wireless/cisco/airo.c case 'a': ai->config.preamble=PREAMBLE_AUTO; set_bit(FLAG_COMMIT, &ai->flags); break; ai 4978 drivers/net/wireless/cisco/airo.c case 'l': ai->config.preamble=PREAMBLE_LONG; set_bit(FLAG_COMMIT, &ai->flags); break; ai 4979 drivers/net/wireless/cisco/airo.c case 's': ai->config.preamble=PREAMBLE_SHORT; set_bit(FLAG_COMMIT, &ai->flags); break; ai 4980 drivers/net/wireless/cisco/airo.c default: airo_print_warn(ai->dev->name, "Unknown preamble"); ai 4983 drivers/net/wireless/cisco/airo.c airo_print_warn(ai->dev->name, "Couldn't figure out %s", line); ai 5005 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 5024 drivers/net/wireless/cisco/airo.c readConfigRid(ai, 1); ai 5026 drivers/net/wireless/cisco/airo.c mode = ai->config.opmode & MODE_CFG_MASK; ai 5036 drivers/net/wireless/cisco/airo.c mode == MODE_STA_ESS ? get_rmode(ai->config.rmode): ai 5039 drivers/net/wireless/cisco/airo.c test_bit(FLAG_RADIO_OFF, &ai->flags) ? "off" : "on", ai 5040 drivers/net/wireless/cisco/airo.c ai->config.nodeName, ai 5041 drivers/net/wireless/cisco/airo.c ai->config.powerSaveMode == POWERSAVE_CAM ? "CAM" : ai 5042 drivers/net/wireless/cisco/airo.c ai->config.powerSaveMode == POWERSAVE_PSP ? "PSP" : ai 5043 drivers/net/wireless/cisco/airo.c ai->config.powerSaveMode == POWERSAVE_PSPCAM ? "PSPCAM" : ai 5045 drivers/net/wireless/cisco/airo.c (int)ai->config.rates[0], ai 5046 drivers/net/wireless/cisco/airo.c (int)ai->config.rates[1], ai 5047 drivers/net/wireless/cisco/airo.c (int)ai->config.rates[2], ai 5048 drivers/net/wireless/cisco/airo.c (int)ai->config.rates[3], ai 5049 drivers/net/wireless/cisco/airo.c (int)ai->config.rates[4], ai 5050 drivers/net/wireless/cisco/airo.c (int)ai->config.rates[5], ai 5051 drivers/net/wireless/cisco/airo.c (int)ai->config.rates[6], ai 5052 drivers/net/wireless/cisco/airo.c (int)ai->config.rates[7], ai 5053 drivers/net/wireless/cisco/airo.c le16_to_cpu(ai->config.channelSet), ai 5054 drivers/net/wireless/cisco/airo.c le16_to_cpu(ai->config.txPower) ai 5068 drivers/net/wireless/cisco/airo.c le16_to_cpu(ai->config.longRetryLimit), ai 5069 drivers/net/wireless/cisco/airo.c le16_to_cpu(ai->config.shortRetryLimit), ai 5070 drivers/net/wireless/cisco/airo.c le16_to_cpu(ai->config.rtsThres), ai 5071 drivers/net/wireless/cisco/airo.c le16_to_cpu(ai->config.txLifetime), ai 5072 drivers/net/wireless/cisco/airo.c le16_to_cpu(ai->config.rxLifetime), ai 5073 drivers/net/wireless/cisco/airo.c ai->config.txDiversity == 1 ? "left" : ai 5074 drivers/net/wireless/cisco/airo.c ai->config.txDiversity == 2 ? "right" : "both", ai 5075 drivers/net/wireless/cisco/airo.c ai->config.rxDiversity == 1 ? "left" : ai 5076 drivers/net/wireless/cisco/airo.c ai->config.rxDiversity == 2 ? "right" : "both", ai 5077 drivers/net/wireless/cisco/airo.c le16_to_cpu(ai->config.fragThresh), ai 5078 drivers/net/wireless/cisco/airo.c ai->config.authType == AUTH_ENCRYPT ? "encrypt" : ai 5079 drivers/net/wireless/cisco/airo.c ai->config.authType == AUTH_SHAREDKEY ? "shared" : "open", ai 5080 drivers/net/wireless/cisco/airo.c ai->config.modulation == MOD_DEFAULT ? "default" : ai 5081 drivers/net/wireless/cisco/airo.c ai->config.modulation == MOD_CCK ? "cck" : ai 5082 drivers/net/wireless/cisco/airo.c ai->config.modulation == MOD_MOK ? "mok" : "error", ai 5083 drivers/net/wireless/cisco/airo.c ai->config.preamble == PREAMBLE_AUTO ? "auto" : ai 5084 drivers/net/wireless/cisco/airo.c ai->config.preamble == PREAMBLE_LONG ? "long" : ai 5085 drivers/net/wireless/cisco/airo.c ai->config.preamble == PREAMBLE_SHORT ? "short" : "error" ai 5095 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 5122 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 1); ai 5123 drivers/net/wireless/cisco/airo.c writeSsidRid(ai, &SSID_rid, 1); ai 5124 drivers/net/wireless/cisco/airo.c enable_MAC(ai, 1); ai 5130 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 5131 drivers/net/wireless/cisco/airo.c APListRid *APList_rid = &ai->APList; ai 5142 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 1); ai 5143 drivers/net/wireless/cisco/airo.c writeAPListRid(ai, APList_rid, 1); ai 5144 drivers/net/wireless/cisco/airo.c enable_MAC(ai, 1); ai 5148 drivers/net/wireless/cisco/airo.c static int do_writerid( struct airo_info *ai, u16 rid, const void *rid_data, ai 5152 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 1); ai 5153 drivers/net/wireless/cisco/airo.c rc = PC4500_writerid(ai, rid, rid_data, len, 1); ai 5154 drivers/net/wireless/cisco/airo.c enable_MAC(ai, 1); ai 5161 drivers/net/wireless/cisco/airo.c static int get_wep_key(struct airo_info *ai, u16 index, char *buf, u16 buflen) ai 5167 drivers/net/wireless/cisco/airo.c rc = readWepKeyRid(ai, &wkr, 1, 1); ai 5177 drivers/net/wireless/cisco/airo.c rc = readWepKeyRid(ai, &wkr, 0, 1); ai 5184 drivers/net/wireless/cisco/airo.c static int get_wep_tx_idx(struct airo_info *ai) ai 5190 drivers/net/wireless/cisco/airo.c rc = readWepKeyRid(ai, &wkr, 1, 1); ai 5197 drivers/net/wireless/cisco/airo.c rc = readWepKeyRid(ai, &wkr, 0, 1); ai 5204 drivers/net/wireless/cisco/airo.c static int set_wep_key(struct airo_info *ai, u16 index, const char *key, ai 5221 drivers/net/wireless/cisco/airo.c if (perm) disable_MAC(ai, lock); ai 5222 drivers/net/wireless/cisco/airo.c rc = writeWepKeyRid(ai, &wkr, perm, lock); ai 5223 drivers/net/wireless/cisco/airo.c if (perm) enable_MAC(ai, lock); ai 5227 drivers/net/wireless/cisco/airo.c static int set_wep_tx_idx(struct airo_info *ai, u16 index, int perm, int lock) ai 5238 drivers/net/wireless/cisco/airo.c ai->defindex = (char)index; ai 5239 drivers/net/wireless/cisco/airo.c disable_MAC(ai, lock); ai 5242 drivers/net/wireless/cisco/airo.c rc = writeWepKeyRid(ai, &wkr, perm, lock); ai 5245 drivers/net/wireless/cisco/airo.c enable_MAC(ai, lock); ai 5252 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 5267 drivers/net/wireless/cisco/airo.c rc = set_wep_tx_idx(ai, index, 1, 1); ai 5269 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "failed to set " ai 5277 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "WepKey passed invalid key index"); ai 5292 drivers/net/wireless/cisco/airo.c rc = set_wep_key(ai, index, key, i/3, 1, 1); ai 5294 drivers/net/wireless/cisco/airo.c airo_print_err(ai->dev->name, "failed to set WEP key at index " ai 5303 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 5329 drivers/net/wireless/cisco/airo.c rc = readWepKeyRid(ai, &wkr, 1, 1); ai 5340 drivers/net/wireless/cisco/airo.c readWepKeyRid(ai, &wkr, 0, 1); ai 5351 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 5373 drivers/net/wireless/cisco/airo.c readSsidRid(ai, &SSID_rid); ai 5394 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 5397 drivers/net/wireless/cisco/airo.c APListRid *APList_rid = &ai->APList; ai 5432 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 5456 drivers/net/wireless/cisco/airo.c if (ai->flags & FLAG_RADIO_MASK) { ai 5463 drivers/net/wireless/cisco/airo.c if (down_interruptible(&ai->sem)) { ai 5468 drivers/net/wireless/cisco/airo.c issuecommand(ai, &cmd, &rsp); ai 5469 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 5479 drivers/net/wireless/cisco/airo.c rc = readBSSListRid(ai, doLoseSync, &BSSList_rid); ai 5492 drivers/net/wireless/cisco/airo.c rc = readBSSListRid(ai, 0, &BSSList_rid); ai 5587 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 5591 drivers/net/wireless/cisco/airo.c if (!ai->SSID) ai 5592 drivers/net/wireless/cisco/airo.c ai->SSID = kmalloc(sizeof(SsidRid), GFP_KERNEL); ai 5593 drivers/net/wireless/cisco/airo.c if (!ai->SSID) ai 5595 drivers/net/wireless/cisco/airo.c readSsidRid(ai, ai->SSID); ai 5598 drivers/net/wireless/cisco/airo.c if (down_interruptible(&ai->sem)) ai 5600 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 0); ai 5602 drivers/net/wireless/cisco/airo.c ai->power = state; ai 5604 drivers/net/wireless/cisco/airo.c issuecommand(ai, &cmd, &rsp); ai 5615 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 5624 drivers/net/wireless/cisco/airo.c mpi_init_descriptors(ai); ai 5625 drivers/net/wireless/cisco/airo.c setup_card(ai, dev->dev_addr, 0); ai 5626 drivers/net/wireless/cisco/airo.c clear_bit(FLAG_RADIO_OFF, &ai->flags); ai 5627 drivers/net/wireless/cisco/airo.c clear_bit(FLAG_PENDING_XMIT, &ai->flags); ai 5629 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_AWAKEN); ai 5630 drivers/net/wireless/cisco/airo.c OUT4500(ai, EVACK, EV_AWAKEN); ai 5634 drivers/net/wireless/cisco/airo.c set_bit(FLAG_COMMIT, &ai->flags); ai 5635 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 0); ai 5637 drivers/net/wireless/cisco/airo.c if (ai->SSID) { ai 5638 drivers/net/wireless/cisco/airo.c writeSsidRid(ai, ai->SSID, 0); ai 5639 drivers/net/wireless/cisco/airo.c kfree(ai->SSID); ai 5640 drivers/net/wireless/cisco/airo.c ai->SSID = NULL; ai 5642 drivers/net/wireless/cisco/airo.c writeAPListRid(ai, &ai->APList, 0); ai 5643 drivers/net/wireless/cisco/airo.c writeConfigRid(ai, 0); ai 5644 drivers/net/wireless/cisco/airo.c enable_MAC(ai, 0); ai 5645 drivers/net/wireless/cisco/airo.c ai->power = PMSG_ON; ai 5648 drivers/net/wireless/cisco/airo.c enable_interrupts(ai); ai 5649 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 5694 drivers/net/wireless/cisco/airo.c struct airo_info *ai; ai 5696 drivers/net/wireless/cisco/airo.c ai = list_entry(airo_devices.next, struct airo_info, dev_list); ai 5697 drivers/net/wireless/cisco/airo.c airo_print_info(ai->dev->name, "Unregistering..."); ai 5698 drivers/net/wireless/cisco/airo.c stop_airo_card(ai->dev, 1); ai 6298 drivers/net/wireless/cisco/airo.c static inline int valid_index(struct airo_info *ai, int index) ai 6300 drivers/net/wireless/cisco/airo.c return (index >= 0) && (index <= ai->max_wep_idx); ai 7215 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 7227 drivers/net/wireless/cisco/airo.c if (ai->flags & FLAG_RADIO_MASK) return -ENETDOWN; ai 7229 drivers/net/wireless/cisco/airo.c if (down_interruptible(&ai->sem)) ai 7234 drivers/net/wireless/cisco/airo.c if (ai->scan_timeout > 0) ai 7240 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 2); ai 7241 drivers/net/wireless/cisco/airo.c writeAPListRid(ai, &APList_rid_empty, 0); ai 7242 drivers/net/wireless/cisco/airo.c enable_MAC(ai, 0); ai 7245 drivers/net/wireless/cisco/airo.c ai->scan_timeout = RUN_AT(3*HZ); ai 7248 drivers/net/wireless/cisco/airo.c issuecommand(ai, &cmd, &rsp); ai 7252 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 7254 drivers/net/wireless/cisco/airo.c wake_up_interruptible(&ai->thr_wait); ai 7269 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 7320 drivers/net/wireless/cisco/airo.c if (ai->rssi) { ai 7322 drivers/net/wireless/cisco/airo.c iwe.u.qual.qual = airo_dbm_to_pct(ai->rssi, dBm); ai 7333 drivers/net/wireless/cisco/airo.c iwe.u.qual.noise = ai->wstats.qual.noise; ai 7382 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_WPA_CAPABLE, &ai->flags)) { ai 7446 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 7452 drivers/net/wireless/cisco/airo.c if (ai->scan_timeout > 0) ai 7455 drivers/net/wireless/cisco/airo.c if (down_interruptible(&ai->sem)) ai 7458 drivers/net/wireless/cisco/airo.c list_for_each_entry (net, &ai->network_list, list) { ai 7477 drivers/net/wireless/cisco/airo.c up(&ai->sem); ai 7633 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 7635 drivers/net/wireless/cisco/airo.c if (ai->power.event) ai 7786 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 7788 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_FLASHING, &ai->flags)) ai 7795 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_COMMIT, &ai->flags)) { ai 7796 drivers/net/wireless/cisco/airo.c disable_MAC (ai, 1); ai 7797 drivers/net/wireless/cisco/airo.c writeConfigRid (ai, 1); ai 7798 drivers/net/wireless/cisco/airo.c enable_MAC(ai, 1); ai 7811 drivers/net/wireless/cisco/airo.c if (copy_to_user(comp->data, &ai->micstats, ai 7812 drivers/net/wireless/cisco/airo.c min((int)comp->len,(int)sizeof(ai->micstats)))) ai 7829 drivers/net/wireless/cisco/airo.c PC4500_readrid(ai,ridcode,iobuf,RIDSIZE, 1); ai 7849 drivers/net/wireless/cisco/airo.c struct airo_info *ai = dev->ml_priv; ai 7859 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_FLASHING, &ai->flags)) ai 7870 drivers/net/wireless/cisco/airo.c case AIROPCFG: ai->config.len = 0; ai 7871 drivers/net/wireless/cisco/airo.c clear_bit(FLAG_COMMIT, &ai->flags); ai 7885 drivers/net/wireless/cisco/airo.c if (enable_MAC(ai, 1) != 0) ai 7894 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 1); ai 7905 drivers/net/wireless/cisco/airo.c PC4500_readrid(ai,RID_STATSDELTACLEAR,iobuf,RIDSIZE, 1); ai 7907 drivers/net/wireless/cisco/airo.c enabled = ai->micstats.enabled; ai 7908 drivers/net/wireless/cisco/airo.c memset(&ai->micstats,0,sizeof(ai->micstats)); ai 7909 drivers/net/wireless/cisco/airo.c ai->micstats.enabled = enabled; ai 7936 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MIC_CAPABLE, &ai->flags)) ai 7940 drivers/net/wireless/cisco/airo.c set_bit (FLAG_ADHOC, &ai->flags); ai 7942 drivers/net/wireless/cisco/airo.c clear_bit (FLAG_ADHOC, &ai->flags); ai 7945 drivers/net/wireless/cisco/airo.c if((*writer)(ai, ridcode, iobuf,comp->len,1)) { ai 8021 drivers/net/wireless/cisco/airo.c static int cmdreset(struct airo_info *ai) { ai 8022 drivers/net/wireless/cisco/airo.c disable_MAC(ai, 1); ai 8024 drivers/net/wireless/cisco/airo.c if(!waitbusy (ai)){ ai 8025 drivers/net/wireless/cisco/airo.c airo_print_info(ai->dev->name, "Waitbusy hang before RESET"); ai 8029 drivers/net/wireless/cisco/airo.c OUT4500(ai,COMMAND,CMD_SOFTRESET); ai 8033 drivers/net/wireless/cisco/airo.c if(!waitbusy (ai)){ ai 8034 drivers/net/wireless/cisco/airo.c airo_print_info(ai->dev->name, "Waitbusy hang AFTER RESET"); ai 8045 drivers/net/wireless/cisco/airo.c static int setflashmode (struct airo_info *ai) { ai 8046 drivers/net/wireless/cisco/airo.c set_bit (FLAG_FLASHING, &ai->flags); ai 8048 drivers/net/wireless/cisco/airo.c OUT4500(ai, SWS0, FLASH_COMMAND); ai 8049 drivers/net/wireless/cisco/airo.c OUT4500(ai, SWS1, FLASH_COMMAND); ai 8051 drivers/net/wireless/cisco/airo.c OUT4500(ai, SWS0, FLASH_COMMAND); ai 8052 drivers/net/wireless/cisco/airo.c OUT4500(ai, COMMAND,0x10); ai 8054 drivers/net/wireless/cisco/airo.c OUT4500(ai, SWS2, FLASH_COMMAND); ai 8055 drivers/net/wireless/cisco/airo.c OUT4500(ai, SWS3, FLASH_COMMAND); ai 8056 drivers/net/wireless/cisco/airo.c OUT4500(ai, COMMAND,0); ai 8060 drivers/net/wireless/cisco/airo.c if(!waitbusy(ai)) { ai 8061 drivers/net/wireless/cisco/airo.c clear_bit (FLAG_FLASHING, &ai->flags); ai 8062 drivers/net/wireless/cisco/airo.c airo_print_info(ai->dev->name, "Waitbusy hang after setflash mode"); ai 8072 drivers/net/wireless/cisco/airo.c static int flashpchar(struct airo_info *ai,int byte,int dwelltime) { ai 8084 drivers/net/wireless/cisco/airo.c while ((IN4500 (ai, SWS0) & 0x8000) && waittime > 0) { ai 8091 drivers/net/wireless/cisco/airo.c airo_print_info(ai->dev->name, "flash putchar busywait timeout!"); ai 8097 drivers/net/wireless/cisco/airo.c OUT4500(ai,SWS0,byte); ai 8100 drivers/net/wireless/cisco/airo.c echo = IN4500(ai,SWS1); ai 8103 drivers/net/wireless/cisco/airo.c OUT4500(ai,SWS1,0); ai 8112 drivers/net/wireless/cisco/airo.c static int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime){ ai 8117 drivers/net/wireless/cisco/airo.c rchar = IN4500(ai,SWS1); ai 8127 drivers/net/wireless/cisco/airo.c OUT4500(ai,SWS1,0); ai 8132 drivers/net/wireless/cisco/airo.c OUT4500(ai,SWS1,0); ai 8143 drivers/net/wireless/cisco/airo.c static int flashputbuf(struct airo_info *ai){ ai 8147 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI,&ai->flags)) ai 8148 drivers/net/wireless/cisco/airo.c memcpy_toio(ai->pciaux + 0x8000, ai->flash, FLASHSIZE); ai 8150 drivers/net/wireless/cisco/airo.c OUT4500(ai,AUXPAGE,0x100); ai 8151 drivers/net/wireless/cisco/airo.c OUT4500(ai,AUXOFF,0); ai 8154 drivers/net/wireless/cisco/airo.c OUT4500(ai,AUXDATA,ai->flash[nwords] & 0xffff); ai 8157 drivers/net/wireless/cisco/airo.c OUT4500(ai,SWS0,0x8000); ai 8165 drivers/net/wireless/cisco/airo.c static int flashrestart(struct airo_info *ai,struct net_device *dev){ ai 8169 drivers/net/wireless/cisco/airo.c clear_bit (FLAG_FLASHING, &ai->flags); ai 8170 drivers/net/wireless/cisco/airo.c if (test_bit(FLAG_MPI, &ai->flags)) { ai 8171 drivers/net/wireless/cisco/airo.c status = mpi_init_descriptors(ai); ai 8175 drivers/net/wireless/cisco/airo.c status = setup_card(ai, dev->dev_addr, 1); ai 8177 drivers/net/wireless/cisco/airo.c if (!test_bit(FLAG_MPI,&ai->flags)) ai 8179 drivers/net/wireless/cisco/airo.c ai->fids[i] = transmit_allocate ai 8180 drivers/net/wireless/cisco/airo.c ( ai, AIRO_DEF_MTU, i >= MAX_FIDS / 2 ); ai 209 drivers/s390/virtio/virtio_ccw.c unsigned long ai; ai 214 drivers/s390/virtio/virtio_ccw.c for (ai = 0;;) { ai 215 drivers/s390/virtio/virtio_ccw.c ai = airq_iv_scan(info->aiv, ai, airq_iv_end(info->aiv)); ai 216 drivers/s390/virtio/virtio_ccw.c if (ai == -1UL) ai 218 drivers/s390/virtio/virtio_ccw.c vring_interrupt(0, (void *)airq_iv_get_ptr(info->aiv, ai)); ai 223 drivers/s390/virtio/virtio_ccw.c for (ai = 0;;) { ai 224 drivers/s390/virtio/virtio_ccw.c ai = airq_iv_scan(info->aiv, ai, airq_iv_end(info->aiv)); ai 225 drivers/s390/virtio/virtio_ccw.c if (ai == -1UL) ai 227 drivers/s390/virtio/virtio_ccw.c vring_interrupt(0, (void *)airq_iv_get_ptr(info->aiv, ai)); ai 13 drivers/staging/uwb/allocator.c static void uwb_rsv_fill_column_alloc(struct uwb_rsv_alloc_info *ai) ai 16 drivers/staging/uwb/allocator.c unsigned char *bm = ai->bm; ai 17 drivers/staging/uwb/allocator.c struct uwb_rsv_col_info *ci = ai->ci; ai 43 drivers/staging/uwb/allocator.c static void uwb_rsv_fill_row_alloc(struct uwb_rsv_alloc_info *ai) ai 46 drivers/staging/uwb/allocator.c unsigned char *bm = ai->bm; ai 47 drivers/staging/uwb/allocator.c struct uwb_rsv_row_info *ri = &ai->ri; ai 65 drivers/staging/uwb/allocator.c ai->safe_allocated_mases++; ai 67 drivers/staging/uwb/allocator.c ai->unsafe_allocated_mases++; ai 73 drivers/staging/uwb/allocator.c ai->total_allocated_mases = ai->safe_allocated_mases + ai->unsafe_allocated_mases; ai 126 drivers/staging/uwb/allocator.c static int uwb_rsv_find_best_column_set(struct uwb_rsv_alloc_info *ai, int interval, ai 129 drivers/staging/uwb/allocator.c struct uwb_rsv_col_info *ci = ai->ci; ai 185 drivers/staging/uwb/allocator.c ai->safe_allocated_mases = (UWB_NUM_ZONES / interval) * num_safe_mas; ai 186 drivers/staging/uwb/allocator.c ai->unsafe_allocated_mases = (UWB_NUM_ZONES / interval) * num_unsafe_mas; ai 187 drivers/staging/uwb/allocator.c ai->total_allocated_mases = ai->safe_allocated_mases + ai->unsafe_allocated_mases; ai 188 drivers/staging/uwb/allocator.c ai->interval = interval; ai 193 drivers/staging/uwb/allocator.c static void get_row_descriptors(struct uwb_rsv_alloc_info *ai) ai 195 drivers/staging/uwb/allocator.c unsigned char *bm = ai->bm; ai 196 drivers/staging/uwb/allocator.c struct uwb_rsv_row_info *ri = &ai->ri; ai 249 drivers/staging/uwb/allocator.c static void get_column_descriptors(struct uwb_rsv_alloc_info *ai) ai 251 drivers/staging/uwb/allocator.c unsigned char *bm = ai->bm; ai 252 drivers/staging/uwb/allocator.c struct uwb_rsv_col_info *ci = ai->ci; ai 260 drivers/staging/uwb/allocator.c static int uwb_rsv_find_best_row_alloc(struct uwb_rsv_alloc_info *ai) ai 263 drivers/staging/uwb/allocator.c int max_rows = ai->max_mas / UWB_USABLE_MAS_PER_ROW; ai 264 drivers/staging/uwb/allocator.c int min_rows = ai->min_mas / UWB_USABLE_MAS_PER_ROW; ai 265 drivers/staging/uwb/allocator.c if (ai->min_mas % UWB_USABLE_MAS_PER_ROW) ai 268 drivers/staging/uwb/allocator.c if (n_rows <= ai->ri.free_rows) { ai 269 drivers/staging/uwb/allocator.c ai->ri.used_rows = n_rows; ai 270 drivers/staging/uwb/allocator.c ai->interval = 1; /* row reservation */ ai 271 drivers/staging/uwb/allocator.c uwb_rsv_fill_row_alloc(ai); ai 278 drivers/staging/uwb/allocator.c static int uwb_rsv_find_best_col_alloc(struct uwb_rsv_alloc_info *ai, int interval) ai 282 drivers/staging/uwb/allocator.c int max_per_zone = ai->max_mas / n_column; ai 283 drivers/staging/uwb/allocator.c int min_per_zone = ai->min_mas / n_column; ai 285 drivers/staging/uwb/allocator.c if (ai->min_mas % n_column) ai 297 drivers/staging/uwb/allocator.c if (uwb_rsv_find_best_column_set(ai, interval, 0, n_mas) == UWB_RSV_ALLOC_NOT_FOUND) ai 301 drivers/staging/uwb/allocator.c if (uwb_rsv_find_best_column_set(ai, interval, n_safe, n_unsafe) == UWB_RSV_ALLOC_FOUND) { ai 302 drivers/staging/uwb/allocator.c uwb_rsv_fill_column_alloc(ai); ai 313 drivers/staging/uwb/allocator.c struct uwb_rsv_alloc_info *ai; ai 317 drivers/staging/uwb/allocator.c ai = kzalloc(sizeof(struct uwb_rsv_alloc_info), GFP_KERNEL); ai 318 drivers/staging/uwb/allocator.c if (!ai) ai 320 drivers/staging/uwb/allocator.c ai->min_mas = rsv->min_mas; ai 321 drivers/staging/uwb/allocator.c ai->max_mas = rsv->max_mas; ai 322 drivers/staging/uwb/allocator.c ai->max_interval = rsv->max_interval; ai 327 drivers/staging/uwb/allocator.c ai->bm[bit_index] = UWB_RSV_MAS_NOT_AVAIL; ai 329 drivers/staging/uwb/allocator.c if (ai->max_interval == 1) { ai 330 drivers/staging/uwb/allocator.c get_row_descriptors(ai); ai 331 drivers/staging/uwb/allocator.c if (uwb_rsv_find_best_row_alloc(ai) == UWB_RSV_ALLOC_FOUND) ai 337 drivers/staging/uwb/allocator.c get_column_descriptors(ai); ai 340 drivers/staging/uwb/allocator.c if (interval > ai->max_interval) ai 342 drivers/staging/uwb/allocator.c if (uwb_rsv_find_best_col_alloc(ai, interval) == UWB_RSV_ALLOC_FOUND) ai 347 drivers/staging/uwb/allocator.c get_row_descriptors(ai); ai 348 drivers/staging/uwb/allocator.c if (uwb_rsv_find_best_row_alloc(ai) == UWB_RSV_ALLOC_FOUND) ai 358 drivers/staging/uwb/allocator.c if (ai->bm[bit_index] == UWB_RSV_MAS_SAFE) ai 360 drivers/staging/uwb/allocator.c else if (ai->bm[bit_index] == UWB_RSV_MAS_UNSAFE) ai 365 drivers/staging/uwb/allocator.c result->safe = ai->safe_allocated_mases; ai 366 drivers/staging/uwb/allocator.c result->unsafe = ai->unsafe_allocated_mases; ai 368 drivers/staging/uwb/allocator.c kfree(ai); ai 372 drivers/staging/uwb/allocator.c kfree(ai); ai 106 include/linux/percpu.h extern void __init pcpu_free_alloc_info(struct pcpu_alloc_info *ai); ai 108 include/linux/percpu.h extern void __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, ai 563 include/uapi/linux/kvm.h #define KVM_S390_INT_IO(ai,cssid,ssid,schid) \ ai 567 include/uapi/linux/kvm.h ((ai) << 26)) ai 130 mm/percpu-internal.h static inline void pcpu_stats_save_ai(const struct pcpu_alloc_info *ai) ai 132 mm/percpu-internal.h memcpy(&pcpu_stats_ai, ai, sizeof(struct pcpu_alloc_info)); ai 210 mm/percpu-internal.h static inline void pcpu_stats_save_ai(const struct pcpu_alloc_info *ai) ai 101 mm/percpu-km.c static int __init pcpu_verify_alloc_info(const struct pcpu_alloc_info *ai) ai 106 mm/percpu-km.c if (ai->nr_groups != 1) { ai 111 mm/percpu-km.c nr_pages = (ai->groups[0].nr_units * ai->unit_size) >> PAGE_SHIFT; ai 374 mm/percpu-vm.c static int __init pcpu_verify_alloc_info(const struct pcpu_alloc_info *ai) ai 1532 mm/percpu.c static int __init pcpu_verify_alloc_info(const struct pcpu_alloc_info *ai); ai 2123 mm/percpu.c struct pcpu_alloc_info *ai; ai 2128 mm/percpu.c base_size = ALIGN(struct_size(ai, groups, nr_groups), ai 2129 mm/percpu.c __alignof__(ai->groups[0].cpu_map[0])); ai 2130 mm/percpu.c ai_size = base_size + nr_units * sizeof(ai->groups[0].cpu_map[0]); ai 2135 mm/percpu.c ai = ptr; ai 2138 mm/percpu.c ai->groups[0].cpu_map = ptr; ai 2141 mm/percpu.c ai->groups[0].cpu_map[unit] = NR_CPUS; ai 2143 mm/percpu.c ai->nr_groups = nr_groups; ai 2144 mm/percpu.c ai->__ai_size = PFN_ALIGN(ai_size); ai 2146 mm/percpu.c return ai; ai 2155 mm/percpu.c void __init pcpu_free_alloc_info(struct pcpu_alloc_info *ai) ai 2157 mm/percpu.c memblock_free_early(__pa(ai), ai->__ai_size); ai 2168 mm/percpu.c const struct pcpu_alloc_info *ai) ai 2176 mm/percpu.c v = ai->nr_groups; ai 2185 mm/percpu.c upa = ai->alloc_size / ai->unit_size; ai 2190 mm/percpu.c lvl, ai->static_size, ai->reserved_size, ai->dyn_size, ai 2191 mm/percpu.c ai->unit_size, ai->alloc_size / ai->atom_size, ai->atom_size); ai 2193 mm/percpu.c for (group = 0; group < ai->nr_groups; group++) { ai 2194 mm/percpu.c const struct pcpu_group_info *gi = &ai->groups[group]; ai 2271 mm/percpu.c void __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, ai 2274 mm/percpu.c size_t size_sum = ai->static_size + ai->reserved_size + ai->dyn_size; ai 2292 mm/percpu.c pcpu_dump_alloc_info(KERN_EMERG, ai); \ ai 2298 mm/percpu.c PCPU_SETUP_BUG_ON(ai->nr_groups <= 0); ai 2300 mm/percpu.c PCPU_SETUP_BUG_ON(!ai->static_size); ai 2305 mm/percpu.c PCPU_SETUP_BUG_ON(ai->unit_size < size_sum); ai 2306 mm/percpu.c PCPU_SETUP_BUG_ON(offset_in_page(ai->unit_size)); ai 2307 mm/percpu.c PCPU_SETUP_BUG_ON(ai->unit_size < PCPU_MIN_UNIT_SIZE); ai 2308 mm/percpu.c PCPU_SETUP_BUG_ON(!IS_ALIGNED(ai->unit_size, PCPU_BITMAP_BLOCK_SIZE)); ai 2309 mm/percpu.c PCPU_SETUP_BUG_ON(ai->dyn_size < PERCPU_DYNAMIC_EARLY_SIZE); ai 2310 mm/percpu.c PCPU_SETUP_BUG_ON(!ai->dyn_size); ai 2311 mm/percpu.c PCPU_SETUP_BUG_ON(!IS_ALIGNED(ai->reserved_size, PCPU_MIN_ALLOC_SIZE)); ai 2314 mm/percpu.c PCPU_SETUP_BUG_ON(pcpu_verify_alloc_info(ai) < 0); ai 2317 mm/percpu.c alloc_size = ai->nr_groups * sizeof(group_offsets[0]); ai 2323 mm/percpu.c alloc_size = ai->nr_groups * sizeof(group_sizes[0]); ai 2347 mm/percpu.c for (group = 0, unit = 0; group < ai->nr_groups; group++, unit += i) { ai 2348 mm/percpu.c const struct pcpu_group_info *gi = &ai->groups[group]; ai 2351 mm/percpu.c group_sizes[group] = gi->nr_units * ai->unit_size; ai 2363 mm/percpu.c unit_off[cpu] = gi->base_offset + i * ai->unit_size; ai 2381 mm/percpu.c pcpu_dump_alloc_info(KERN_DEBUG, ai); ai 2383 mm/percpu.c pcpu_nr_groups = ai->nr_groups; ai 2390 mm/percpu.c pcpu_unit_pages = ai->unit_size >> PAGE_SHIFT; ai 2392 mm/percpu.c pcpu_atom_size = ai->atom_size; ai 2396 mm/percpu.c pcpu_stats_save_ai(ai); ai 2419 mm/percpu.c static_size = ALIGN(ai->static_size, PCPU_MIN_ALLOC_SIZE); ai 2420 mm/percpu.c dyn_size = ai->dyn_size - (static_size - ai->static_size); ai 2431 mm/percpu.c map_size = ai->reserved_size ?: dyn_size; ai 2435 mm/percpu.c if (ai->reserved_size) { ai 2439 mm/percpu.c ai->reserved_size; ai 2542 mm/percpu.c struct pcpu_alloc_info *ai; ai 2626 mm/percpu.c ai = pcpu_alloc_alloc_info(nr_groups, nr_units); ai 2627 mm/percpu.c if (!ai) ai 2629 mm/percpu.c cpu_map = ai->groups[0].cpu_map; ai 2632 mm/percpu.c ai->groups[group].cpu_map = cpu_map; ai 2636 mm/percpu.c ai->static_size = static_size; ai 2637 mm/percpu.c ai->reserved_size = reserved_size; ai 2638 mm/percpu.c ai->dyn_size = dyn_size; ai 2639 mm/percpu.c ai->unit_size = alloc_size / upa; ai 2640 mm/percpu.c ai->atom_size = atom_size; ai 2641 mm/percpu.c ai->alloc_size = alloc_size; ai 2644 mm/percpu.c struct pcpu_group_info *gi = &ai->groups[group]; ai 2651 mm/percpu.c gi->base_offset = unit * ai->unit_size; ai 2661 mm/percpu.c return ai; ai 2706 mm/percpu.c struct pcpu_alloc_info *ai; ai 2711 mm/percpu.c ai = pcpu_build_alloc_info(reserved_size, dyn_size, atom_size, ai 2713 mm/percpu.c if (IS_ERR(ai)) ai 2714 mm/percpu.c return PTR_ERR(ai); ai 2716 mm/percpu.c size_sum = ai->static_size + ai->reserved_size + ai->dyn_size; ai 2717 mm/percpu.c areas_size = PFN_ALIGN(ai->nr_groups * sizeof(void *)); ai 2727 mm/percpu.c for (group = 0; group < ai->nr_groups; group++) { ai 2728 mm/percpu.c struct pcpu_group_info *gi = &ai->groups[group]; ai 2737 mm/percpu.c ptr = alloc_fn(cpu, gi->nr_units * ai->unit_size, atom_size); ai 2751 mm/percpu.c max_distance += ai->unit_size * ai->groups[highest_group].nr_units; ai 2769 mm/percpu.c for (group = 0; group < ai->nr_groups; group++) { ai 2770 mm/percpu.c struct pcpu_group_info *gi = &ai->groups[group]; ai 2773 mm/percpu.c for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) { ai 2776 mm/percpu.c free_fn(ptr, ai->unit_size); ai 2780 mm/percpu.c memcpy(ptr, __per_cpu_load, ai->static_size); ai 2781 mm/percpu.c free_fn(ptr + size_sum, ai->unit_size - size_sum); ai 2786 mm/percpu.c for (group = 0; group < ai->nr_groups; group++) { ai 2787 mm/percpu.c ai->groups[group].base_offset = areas[group] - base; ai 2791 mm/percpu.c PFN_DOWN(size_sum), ai->static_size, ai->reserved_size, ai 2792 mm/percpu.c ai->dyn_size, ai->unit_size); ai 2794 mm/percpu.c pcpu_setup_first_chunk(ai, base); ai 2798 mm/percpu.c for (group = 0; group < ai->nr_groups; group++) ai 2801 mm/percpu.c ai->groups[group].nr_units * ai->unit_size); ai 2803 mm/percpu.c pcpu_free_alloc_info(ai); ai 2833 mm/percpu.c struct pcpu_alloc_info *ai; ai 2844 mm/percpu.c ai = pcpu_build_alloc_info(reserved_size, 0, PAGE_SIZE, NULL); ai 2845 mm/percpu.c if (IS_ERR(ai)) ai 2846 mm/percpu.c return PTR_ERR(ai); ai 2847 mm/percpu.c BUG_ON(ai->nr_groups != 1); ai 2848 mm/percpu.c upa = ai->alloc_size/ai->unit_size; ai 2850 mm/percpu.c if (WARN_ON(ai->groups[0].nr_units != nr_g0_units)) { ai 2851 mm/percpu.c pcpu_free_alloc_info(ai); ai 2855 mm/percpu.c unit_pages = ai->unit_size >> PAGE_SHIFT; ai 2868 mm/percpu.c unsigned int cpu = ai->groups[0].cpu_map[unit]; ai 2886 mm/percpu.c vm.size = num_possible_cpus() * ai->unit_size; ai 2891 mm/percpu.c (unsigned long)vm.addr + unit * ai->unit_size; ai 2911 mm/percpu.c memcpy((void *)unit_addr, __per_cpu_load, ai->static_size); ai 2916 mm/percpu.c unit_pages, psize_str, ai->static_size, ai 2917 mm/percpu.c ai->reserved_size, ai->dyn_size); ai 2919 mm/percpu.c pcpu_setup_first_chunk(ai, vm.addr); ai 2928 mm/percpu.c pcpu_free_alloc_info(ai); ai 2996 mm/percpu.c struct pcpu_alloc_info *ai; ai 2999 mm/percpu.c ai = pcpu_alloc_alloc_info(1, 1); ai 3001 mm/percpu.c if (!ai || !fc) ai 3006 mm/percpu.c ai->dyn_size = unit_size; ai 3007 mm/percpu.c ai->unit_size = unit_size; ai 3008 mm/percpu.c ai->atom_size = unit_size; ai 3009 mm/percpu.c ai->alloc_size = unit_size; ai 3010 mm/percpu.c ai->groups[0].nr_units = 1; ai 3011 mm/percpu.c ai->groups[0].cpu_map[0] = 0; ai 3013 mm/percpu.c pcpu_setup_first_chunk(ai, fc); ai 3014 mm/percpu.c pcpu_free_alloc_info(ai); ai 97 net/ipv4/tcp_highspeed.c u32 ai; ai 105 net/ipv4/tcp_highspeed.c ca->ai = 0; ai 130 net/ipv4/tcp_highspeed.c if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) { ai 131 net/ipv4/tcp_highspeed.c while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd && ai 132 net/ipv4/tcp_highspeed.c ca->ai < HSTCP_AIMD_MAX - 1) ai 133 net/ipv4/tcp_highspeed.c ca->ai++; ai 134 net/ipv4/tcp_highspeed.c } else if (ca->ai && tp->snd_cwnd <= hstcp_aimd_vals[ca->ai-1].cwnd) { ai 135 net/ipv4/tcp_highspeed.c while (ca->ai && tp->snd_cwnd <= hstcp_aimd_vals[ca->ai-1].cwnd) ai 136 net/ipv4/tcp_highspeed.c ca->ai--; ai 142 net/ipv4/tcp_highspeed.c tp->snd_cwnd_cnt += ca->ai + 1; ai 157 net/ipv4/tcp_highspeed.c return max(tp->snd_cwnd - ((tp->snd_cwnd * hstcp_aimd_vals[ca->ai].md) >> 8), 2U); ai 117 sound/pci/asihpi/hpi_internal.h #define HPI_CTL_ATTR(ctl, ai) ((HPI_CONTROL_##ctl << 8) + ai) ai 667 sound/pci/hda/patch_hdmi.c union audio_infoframe ai; ai 669 sound/pci/hda/patch_hdmi.c memset(&ai, 0, sizeof(ai)); ai 671 sound/pci/hda/patch_hdmi.c struct hdmi_audio_infoframe *hdmi_ai = &ai.hdmi; ai 680 sound/pci/hda/patch_hdmi.c struct dp_audio_infoframe *dp_ai = &ai.dp; ai 698 sound/pci/hda/patch_hdmi.c if (!hdmi_infoframe_uptodate(codec, pin_nid, ai.bytes, ai 699 sound/pci/hda/patch_hdmi.c sizeof(ai))) { ai 706 sound/pci/hda/patch_hdmi.c ai.bytes, sizeof(ai)); ai 563 tools/include/uapi/linux/kvm.h #define KVM_S390_INT_IO(ai,cssid,ssid,schid) \ ai 567 tools/include/uapi/linux/kvm.h ((ai) << 26)) ai 881 tools/testing/selftests/cgroup/test_memcontrol.c struct addrinfo *ai; ai 887 tools/testing/selftests/cgroup/test_memcontrol.c ret = getaddrinfo(server, servport, NULL, &ai); ai 891 tools/testing/selftests/cgroup/test_memcontrol.c sk = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); ai 895 tools/testing/selftests/cgroup/test_memcontrol.c ret = connect(sk, ai->ai_addr, ai->ai_addrlen); ai 925 tools/testing/selftests/cgroup/test_memcontrol.c freeaddrinfo(ai); ai 42 tools/testing/vsock/control.c struct addrinfo *ai; ai 51 tools/testing/vsock/control.c for (ai = result; ai; ai = ai->ai_next) { ai 55 tools/testing/vsock/control.c fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); ai 60 tools/testing/vsock/control.c if (connect(fd, ai->ai_addr, ai->ai_addrlen) < 0) ai 74 tools/testing/vsock/control.c if (bind(fd, ai->ai_addr, ai->ai_addrlen) < 0) ai 360 tools/usb/usbip/src/usbipd.c static void addrinfo_to_text(struct addrinfo *ai, char buf[], ai 369 tools/usb/usbip/src/usbipd.c rc = getnameinfo(ai->ai_addr, ai->ai_addrlen, hbuf, sizeof(hbuf), ai 380 tools/usb/usbip/src/usbipd.c struct addrinfo *ai; ai 385 tools/usb/usbip/src/usbipd.c for (ai = ai_head; ai && nsockfd < maxsockfd; ai = ai->ai_next) { ai 388 tools/usb/usbip/src/usbipd.c addrinfo_to_text(ai, ai_buf, ai_buf_size); ai 390 tools/usb/usbip/src/usbipd.c sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); ai 403 tools/usb/usbip/src/usbipd.c ret = bind(sock, ai->ai_addr, ai->ai_addrlen);