Lines Matching refs:dev

103 static int adm8211_read_eeprom(struct ieee80211_hw *dev)  in adm8211_read_eeprom()  argument
105 struct adm8211_priv *priv = dev->priv; in adm8211_read_eeprom()
240 static inline void adm8211_write_sram(struct ieee80211_hw *dev, in adm8211_write_sram() argument
243 struct adm8211_priv *priv = dev->priv; in adm8211_write_sram()
256 static void adm8211_write_sram_bytes(struct ieee80211_hw *dev, in adm8211_write_sram_bytes() argument
260 struct adm8211_priv *priv = dev->priv; in adm8211_write_sram_bytes()
267 adm8211_write_sram(dev, addr + i / 2, val); in adm8211_write_sram_bytes()
273 adm8211_write_sram(dev, addr + i / 4, val); in adm8211_write_sram_bytes()
280 static void adm8211_clear_sram(struct ieee80211_hw *dev) in adm8211_clear_sram() argument
282 struct adm8211_priv *priv = dev->priv; in adm8211_clear_sram()
287 adm8211_write_sram(dev, addr, 0); in adm8211_clear_sram()
292 static int adm8211_get_stats(struct ieee80211_hw *dev, in adm8211_get_stats() argument
295 struct adm8211_priv *priv = dev->priv; in adm8211_get_stats()
302 static void adm8211_interrupt_tci(struct ieee80211_hw *dev) in adm8211_interrupt_tci() argument
304 struct adm8211_priv *priv = dev->priv; in adm8211_interrupt_tci()
326 dma_unmap_single(&priv->pdev->dev, info->mapping, in adm8211_interrupt_tci()
337 ieee80211_tx_status_irqsafe(dev, skb); in adm8211_interrupt_tci()
343 ieee80211_wake_queue(dev, 0); in adm8211_interrupt_tci()
350 static void adm8211_interrupt_rci(struct ieee80211_hw *dev) in adm8211_interrupt_rci() argument
352 struct adm8211_priv *priv = dev->priv; in adm8211_interrupt_rci()
372 wiphy_debug(dev->wiphy, "frame too long (%d)\n", in adm8211_interrupt_rci()
384 dma_sync_single_for_cpu(&priv->pdev->dev, in adm8211_interrupt_rci()
391 dma_sync_single_for_device(&priv->pdev->dev, in adm8211_interrupt_rci()
401 dma_unmap_single(&priv->pdev->dev, in adm8211_interrupt_rci()
406 dma_map_single(&priv->pdev->dev, in adm8211_interrupt_rci()
410 if (dma_mapping_error(&priv->pdev->dev, in adm8211_interrupt_rci()
447 ieee80211_rx_irqsafe(dev, skb); in adm8211_interrupt_rci()
462 wiphy_debug(dev->wiphy, "%s\n", #x); \ in adm8211_interrupt()
465 struct ieee80211_hw *dev = dev_id; in adm8211_interrupt() local
466 struct adm8211_priv *priv = dev->priv; in adm8211_interrupt()
476 adm8211_interrupt_rci(dev); in adm8211_interrupt()
478 adm8211_interrupt_tci(dev); in adm8211_interrupt()
504 static void adm8211_rf_write_syn_ ## name (struct ieee80211_hw *dev, \
506 struct adm8211_priv *priv = dev->priv; \
559 static int adm8211_write_bbp(struct ieee80211_hw *dev, u8 addr, u8 data) in adm8211_write_bbp() argument
561 struct adm8211_priv *priv = dev->priv; in adm8211_write_bbp()
575 wiphy_debug(dev->wiphy, in adm8211_write_bbp()
610 wiphy_debug(dev->wiphy, in adm8211_write_bbp()
619 static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan) in adm8211_rf_set_channel() argument
628 struct adm8211_priv *priv = dev->priv; in adm8211_rf_set_channel()
645 adm8211_rf_write_syn_rfmd2958(dev, 0x00, 0x04007); in adm8211_rf_set_channel()
646 adm8211_rf_write_syn_rfmd2958(dev, 0x02, 0x00033); in adm8211_rf_set_channel()
648 adm8211_rf_write_syn_rfmd2958(dev, 0x05, in adm8211_rf_set_channel()
650 adm8211_rf_write_syn_rfmd2958(dev, 0x06, in adm8211_rf_set_channel()
655 adm8211_rf_write_syn_rfmd2948(dev, SI4126_MAIN_CONF, in adm8211_rf_set_channel()
657 adm8211_rf_write_syn_rfmd2948(dev, SI4126_POWERDOWN, in adm8211_rf_set_channel()
660 adm8211_rf_write_syn_rfmd2948(dev, SI4126_PHASE_DET_GAIN, 0); in adm8211_rf_set_channel()
661 adm8211_rf_write_syn_rfmd2948(dev, SI4126_RF2_N_DIV, in adm8211_rf_set_channel()
664 adm8211_rf_write_syn_rfmd2948(dev, SI4126_IF_N_DIV, 1496); in adm8211_rf_set_channel()
665 adm8211_rf_write_syn_rfmd2948(dev, SI4126_RF2_R_DIV, 44); in adm8211_rf_set_channel()
666 adm8211_rf_write_syn_rfmd2948(dev, SI4126_IF_R_DIV, 44); in adm8211_rf_set_channel()
670 adm8211_rf_write_syn_max2820(dev, 0x3, in adm8211_rf_set_channel()
675 adm8211_rf_write_syn_al2210l(dev, 0x0, in adm8211_rf_set_channel()
680 wiphy_debug(dev->wiphy, "unsupported transceiver type %d\n", in adm8211_rf_set_channel()
701 adm8211_rf_write_syn_rfmd2958(dev, 0x0B, 0x07100); in adm8211_rf_set_channel()
707 adm8211_rf_write_syn_rfmd2958(dev, 0x0A, reg); in adm8211_rf_set_channel()
709 adm8211_rf_write_syn_rfmd2958(dev, 0x09, 0x00050 | in adm8211_rf_set_channel()
725 adm8211_write_bbp(dev, RF3000_TX_VAR_GAIN__TX_LEN_EXT, in adm8211_rf_set_channel()
727 adm8211_write_bbp(dev, RF3000_LOW_GAIN_CALIB, lpf_cutoff); in adm8211_rf_set_channel()
728 adm8211_write_bbp(dev, RF3000_HIGH_GAIN_CALIB, lnags_thresh); in adm8211_rf_set_channel()
729 adm8211_write_bbp(dev, 0x1c, priv->pdev->revision == ADM8211_REV_BA ? in adm8211_rf_set_channel()
731 adm8211_write_bbp(dev, 0x1d, priv->eeprom->cr29); in adm8211_rf_set_channel()
737 wiphy_debug(dev->wiphy, "unsupported BBP type %d\n", in adm8211_rf_set_channel()
751 static void adm8211_update_mode(struct ieee80211_hw *dev) in adm8211_update_mode() argument
753 struct adm8211_priv *priv = dev->priv; in adm8211_update_mode()
780 static void adm8211_hw_init_syn(struct ieee80211_hw *dev) in adm8211_hw_init_syn() argument
782 struct adm8211_priv *priv = dev->priv; in adm8211_hw_init_syn()
790 adm8211_rf_write_syn_rfmd2958(dev, 0x1F, 0x00000); in adm8211_hw_init_syn()
792 adm8211_rf_write_syn_rfmd2958(dev, 0x0C, 0x3001F); in adm8211_hw_init_syn()
794 adm8211_rf_write_syn_rfmd2958(dev, 0x01, 0x29C03); in adm8211_hw_init_syn()
796 adm8211_rf_write_syn_rfmd2958(dev, 0x03, 0x1FF6F); in adm8211_hw_init_syn()
798 adm8211_rf_write_syn_rfmd2958(dev, 0x04, 0x29403); in adm8211_hw_init_syn()
800 adm8211_rf_write_syn_rfmd2958(dev, 0x07, 0x1456F); in adm8211_hw_init_syn()
802 adm8211_rf_write_syn_rfmd2958(dev, 0x09, in adm8211_hw_init_syn()
806 adm8211_rf_write_syn_rfmd2958(dev, 0x08, 0x3FFF8); in adm8211_hw_init_syn()
810 adm8211_rf_write_syn_max2820(dev, 0x1, 0x01E); in adm8211_hw_init_syn()
811 adm8211_rf_write_syn_max2820(dev, 0x2, 0x001); in adm8211_hw_init_syn()
812 adm8211_rf_write_syn_max2820(dev, 0x3, 0x054); in adm8211_hw_init_syn()
813 adm8211_rf_write_syn_max2820(dev, 0x4, 0x310); in adm8211_hw_init_syn()
814 adm8211_rf_write_syn_max2820(dev, 0x5, 0x000); in adm8211_hw_init_syn()
818 adm8211_rf_write_syn_al2210l(dev, 0x0, 0x0196C); in adm8211_hw_init_syn()
819 adm8211_rf_write_syn_al2210l(dev, 0x1, 0x007CB); in adm8211_hw_init_syn()
820 adm8211_rf_write_syn_al2210l(dev, 0x2, 0x3582F); in adm8211_hw_init_syn()
821 adm8211_rf_write_syn_al2210l(dev, 0x3, 0x010A9); in adm8211_hw_init_syn()
822 adm8211_rf_write_syn_al2210l(dev, 0x4, 0x77280); in adm8211_hw_init_syn()
823 adm8211_rf_write_syn_al2210l(dev, 0x5, 0x45641); in adm8211_hw_init_syn()
824 adm8211_rf_write_syn_al2210l(dev, 0x6, 0xEA130); in adm8211_hw_init_syn()
825 adm8211_rf_write_syn_al2210l(dev, 0x7, 0x80000); in adm8211_hw_init_syn()
826 adm8211_rf_write_syn_al2210l(dev, 0x8, 0x7850F); in adm8211_hw_init_syn()
827 adm8211_rf_write_syn_al2210l(dev, 0x9, 0xF900C); in adm8211_hw_init_syn()
828 adm8211_rf_write_syn_al2210l(dev, 0xA, 0x00000); in adm8211_hw_init_syn()
829 adm8211_rf_write_syn_al2210l(dev, 0xB, 0x00000); in adm8211_hw_init_syn()
838 static int adm8211_hw_init_bbp(struct ieee80211_hw *dev) in adm8211_hw_init_bbp() argument
840 struct adm8211_priv *priv = dev->priv; in adm8211_hw_init_bbp()
898 adm8211_hw_init_syn(dev); in adm8211_hw_init_bbp()
916 adm8211_write_bbp(dev, RF3000_CCA_CTRL, 0x80); in adm8211_hw_init_bbp()
918 adm8211_write_bbp(dev, RF3000_DIVERSITY__RSSI, 0x80); in adm8211_hw_init_bbp()
919 adm8211_write_bbp(dev, RF3000_TX_VAR_GAIN__TX_LEN_EXT, 0x74); in adm8211_hw_init_bbp()
920 adm8211_write_bbp(dev, RF3000_LOW_GAIN_CALIB, 0x38); in adm8211_hw_init_bbp()
921 adm8211_write_bbp(dev, RF3000_HIGH_GAIN_CALIB, 0x40); in adm8211_hw_init_bbp()
924 adm8211_write_bbp(dev, 0x1c, 0x00); in adm8211_hw_init_bbp()
925 adm8211_write_bbp(dev, 0x1d, 0x80); in adm8211_hw_init_bbp()
928 adm8211_write_bbp(dev, 0x1c, priv->eeprom->cr28); in adm8211_hw_init_bbp()
930 adm8211_write_bbp(dev, 0x1c, 0x00); in adm8211_hw_init_bbp()
932 adm8211_write_bbp(dev, 0x1d, priv->eeprom->cr29); in adm8211_hw_init_bbp()
936 adm8211_write_bbp(dev, 0x00, 0xFF); in adm8211_hw_init_bbp()
938 adm8211_write_bbp(dev, 0x07, 0x0A); in adm8211_hw_init_bbp()
944 adm8211_write_bbp(dev, 0x00, 0x00); in adm8211_hw_init_bbp()
945 adm8211_write_bbp(dev, 0x01, 0x00); in adm8211_hw_init_bbp()
946 adm8211_write_bbp(dev, 0x02, 0x00); in adm8211_hw_init_bbp()
947 adm8211_write_bbp(dev, 0x03, 0x00); in adm8211_hw_init_bbp()
948 adm8211_write_bbp(dev, 0x06, 0x0f); in adm8211_hw_init_bbp()
949 adm8211_write_bbp(dev, 0x09, 0x00); in adm8211_hw_init_bbp()
950 adm8211_write_bbp(dev, 0x0a, 0x00); in adm8211_hw_init_bbp()
951 adm8211_write_bbp(dev, 0x0b, 0x00); in adm8211_hw_init_bbp()
952 adm8211_write_bbp(dev, 0x0c, 0x00); in adm8211_hw_init_bbp()
953 adm8211_write_bbp(dev, 0x0f, 0xAA); in adm8211_hw_init_bbp()
954 adm8211_write_bbp(dev, 0x10, 0x8c); in adm8211_hw_init_bbp()
955 adm8211_write_bbp(dev, 0x11, 0x43); in adm8211_hw_init_bbp()
956 adm8211_write_bbp(dev, 0x18, 0x40); in adm8211_hw_init_bbp()
957 adm8211_write_bbp(dev, 0x20, 0x23); in adm8211_hw_init_bbp()
958 adm8211_write_bbp(dev, 0x21, 0x02); in adm8211_hw_init_bbp()
959 adm8211_write_bbp(dev, 0x22, 0x28); in adm8211_hw_init_bbp()
960 adm8211_write_bbp(dev, 0x23, 0x30); in adm8211_hw_init_bbp()
961 adm8211_write_bbp(dev, 0x24, 0x2d); in adm8211_hw_init_bbp()
962 adm8211_write_bbp(dev, 0x28, 0x35); in adm8211_hw_init_bbp()
963 adm8211_write_bbp(dev, 0x2a, 0x8c); in adm8211_hw_init_bbp()
964 adm8211_write_bbp(dev, 0x2b, 0x81); in adm8211_hw_init_bbp()
965 adm8211_write_bbp(dev, 0x2c, 0x44); in adm8211_hw_init_bbp()
966 adm8211_write_bbp(dev, 0x2d, 0x0A); in adm8211_hw_init_bbp()
967 adm8211_write_bbp(dev, 0x29, 0x40); in adm8211_hw_init_bbp()
968 adm8211_write_bbp(dev, 0x60, 0x08); in adm8211_hw_init_bbp()
969 adm8211_write_bbp(dev, 0x64, 0x01); in adm8211_hw_init_bbp()
973 adm8211_write_bbp(dev, 0x00, 0x00); in adm8211_hw_init_bbp()
974 adm8211_write_bbp(dev, 0x01, 0x00); in adm8211_hw_init_bbp()
975 adm8211_write_bbp(dev, 0x02, 0x00); in adm8211_hw_init_bbp()
976 adm8211_write_bbp(dev, 0x03, 0x00); in adm8211_hw_init_bbp()
977 adm8211_write_bbp(dev, 0x06, 0x0f); in adm8211_hw_init_bbp()
978 adm8211_write_bbp(dev, 0x09, 0x05); in adm8211_hw_init_bbp()
979 adm8211_write_bbp(dev, 0x0a, 0x02); in adm8211_hw_init_bbp()
980 adm8211_write_bbp(dev, 0x0b, 0x00); in adm8211_hw_init_bbp()
981 adm8211_write_bbp(dev, 0x0c, 0x0f); in adm8211_hw_init_bbp()
982 adm8211_write_bbp(dev, 0x0f, 0x55); in adm8211_hw_init_bbp()
983 adm8211_write_bbp(dev, 0x10, 0x8d); in adm8211_hw_init_bbp()
984 adm8211_write_bbp(dev, 0x11, 0x43); in adm8211_hw_init_bbp()
985 adm8211_write_bbp(dev, 0x18, 0x4a); in adm8211_hw_init_bbp()
986 adm8211_write_bbp(dev, 0x20, 0x20); in adm8211_hw_init_bbp()
987 adm8211_write_bbp(dev, 0x21, 0x02); in adm8211_hw_init_bbp()
988 adm8211_write_bbp(dev, 0x22, 0x23); in adm8211_hw_init_bbp()
989 adm8211_write_bbp(dev, 0x23, 0x30); in adm8211_hw_init_bbp()
990 adm8211_write_bbp(dev, 0x24, 0x2d); in adm8211_hw_init_bbp()
991 adm8211_write_bbp(dev, 0x2a, 0x8c); in adm8211_hw_init_bbp()
992 adm8211_write_bbp(dev, 0x2b, 0x81); in adm8211_hw_init_bbp()
993 adm8211_write_bbp(dev, 0x2c, 0x44); in adm8211_hw_init_bbp()
994 adm8211_write_bbp(dev, 0x29, 0x4a); in adm8211_hw_init_bbp()
995 adm8211_write_bbp(dev, 0x60, 0x2b); in adm8211_hw_init_bbp()
996 adm8211_write_bbp(dev, 0x64, 0x01); in adm8211_hw_init_bbp()
1000 adm8211_write_bbp(dev, 0x00, 0x00); in adm8211_hw_init_bbp()
1001 adm8211_write_bbp(dev, 0x01, 0x00); in adm8211_hw_init_bbp()
1002 adm8211_write_bbp(dev, 0x02, 0x00); in adm8211_hw_init_bbp()
1003 adm8211_write_bbp(dev, 0x03, 0x00); in adm8211_hw_init_bbp()
1004 adm8211_write_bbp(dev, 0x06, 0x0f); in adm8211_hw_init_bbp()
1005 adm8211_write_bbp(dev, 0x07, 0x05); in adm8211_hw_init_bbp()
1006 adm8211_write_bbp(dev, 0x08, 0x03); in adm8211_hw_init_bbp()
1007 adm8211_write_bbp(dev, 0x09, 0x00); in adm8211_hw_init_bbp()
1008 adm8211_write_bbp(dev, 0x0a, 0x00); in adm8211_hw_init_bbp()
1009 adm8211_write_bbp(dev, 0x0b, 0x00); in adm8211_hw_init_bbp()
1010 adm8211_write_bbp(dev, 0x0c, 0x10); in adm8211_hw_init_bbp()
1011 adm8211_write_bbp(dev, 0x0f, 0x55); in adm8211_hw_init_bbp()
1012 adm8211_write_bbp(dev, 0x10, 0x8d); in adm8211_hw_init_bbp()
1013 adm8211_write_bbp(dev, 0x11, 0x43); in adm8211_hw_init_bbp()
1014 adm8211_write_bbp(dev, 0x18, 0x4a); in adm8211_hw_init_bbp()
1015 adm8211_write_bbp(dev, 0x20, 0x20); in adm8211_hw_init_bbp()
1016 adm8211_write_bbp(dev, 0x21, 0x02); in adm8211_hw_init_bbp()
1017 adm8211_write_bbp(dev, 0x22, 0x23); in adm8211_hw_init_bbp()
1018 adm8211_write_bbp(dev, 0x23, 0x30); in adm8211_hw_init_bbp()
1019 adm8211_write_bbp(dev, 0x24, 0x2d); in adm8211_hw_init_bbp()
1020 adm8211_write_bbp(dev, 0x2a, 0xaa); in adm8211_hw_init_bbp()
1021 adm8211_write_bbp(dev, 0x2b, 0x81); in adm8211_hw_init_bbp()
1022 adm8211_write_bbp(dev, 0x2c, 0x44); in adm8211_hw_init_bbp()
1023 adm8211_write_bbp(dev, 0x29, 0xfa); in adm8211_hw_init_bbp()
1024 adm8211_write_bbp(dev, 0x60, 0x2d); in adm8211_hw_init_bbp()
1025 adm8211_write_bbp(dev, 0x64, 0x01); in adm8211_hw_init_bbp()
1032 wiphy_debug(dev->wiphy, "unsupported transceiver %d\n", in adm8211_hw_init_bbp()
1037 wiphy_debug(dev->wiphy, "unsupported BBP %d\n", priv->bbp_type); in adm8211_hw_init_bbp()
1050 static int adm8211_set_rate(struct ieee80211_hw *dev) in adm8211_set_rate() argument
1052 struct adm8211_priv *priv = dev->priv; in adm8211_set_rate()
1071 adm8211_write_sram_bytes(dev, ADM8211_SRAM_SUPP_RATE, rate_buf, in adm8211_set_rate()
1087 static void adm8211_hw_init(struct ieee80211_hw *dev) in adm8211_hw_init() argument
1089 struct adm8211_priv *priv = dev->priv; in adm8211_hw_init()
1135 adm8211_set_rate(dev); in adm8211_hw_init()
1190 adm8211_hw_init_bbp(dev); in adm8211_hw_init()
1212 static int adm8211_hw_reset(struct ieee80211_hw *dev) in adm8211_hw_reset() argument
1214 struct adm8211_priv *priv = dev->priv; in adm8211_hw_reset()
1252 adm8211_clear_sram(dev); in adm8211_hw_reset()
1257 static u64 adm8211_get_tsft(struct ieee80211_hw *dev, in adm8211_get_tsft() argument
1260 struct adm8211_priv *priv = dev->priv; in adm8211_get_tsft()
1272 static void adm8211_set_interval(struct ieee80211_hw *dev, in adm8211_set_interval() argument
1275 struct adm8211_priv *priv = dev->priv; in adm8211_set_interval()
1284 static void adm8211_set_bssid(struct ieee80211_hw *dev, const u8 *bssid) in adm8211_set_bssid() argument
1286 struct adm8211_priv *priv = dev->priv; in adm8211_set_bssid()
1296 static int adm8211_config(struct ieee80211_hw *dev, u32 changed) in adm8211_config() argument
1298 struct adm8211_priv *priv = dev->priv; in adm8211_config()
1299 struct ieee80211_conf *conf = &dev->conf; in adm8211_config()
1305 adm8211_rf_set_channel(dev, priv->channel); in adm8211_config()
1311 static void adm8211_bss_info_changed(struct ieee80211_hw *dev, in adm8211_bss_info_changed() argument
1316 struct adm8211_priv *priv = dev->priv; in adm8211_bss_info_changed()
1322 adm8211_set_bssid(dev, conf->bssid); in adm8211_bss_info_changed()
1346 static void adm8211_configure_filter(struct ieee80211_hw *dev, in adm8211_configure_filter() argument
1352 struct adm8211_priv *priv = dev->priv; in adm8211_configure_filter()
1377 ieee80211_hw_set(dev, RX_INCLUDES_FCS); in adm8211_configure_filter()
1379 __clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, dev->flags); in adm8211_configure_filter()
1382 adm8211_set_bssid(dev, bcast); in adm8211_configure_filter()
1384 adm8211_set_bssid(dev, priv->bssid); in adm8211_configure_filter()
1391 static int adm8211_add_interface(struct ieee80211_hw *dev, in adm8211_add_interface() argument
1394 struct adm8211_priv *priv = dev->priv; in adm8211_add_interface()
1411 adm8211_update_mode(dev); in adm8211_add_interface()
1418 static void adm8211_remove_interface(struct ieee80211_hw *dev, in adm8211_remove_interface() argument
1421 struct adm8211_priv *priv = dev->priv; in adm8211_remove_interface()
1425 static int adm8211_init_rings(struct ieee80211_hw *dev) in adm8211_init_rings() argument
1427 struct adm8211_priv *priv = dev->priv; in adm8211_init_rings()
1450 rx_info->mapping = dma_map_single(&priv->pdev->dev, in adm8211_init_rings()
1454 if (dma_mapping_error(&priv->pdev->dev, rx_info->mapping)) { in adm8211_init_rings()
1482 static void adm8211_free_rings(struct ieee80211_hw *dev) in adm8211_free_rings() argument
1484 struct adm8211_priv *priv = dev->priv; in adm8211_free_rings()
1491 dma_unmap_single(&priv->pdev->dev, in adm8211_free_rings()
1502 dma_unmap_single(&priv->pdev->dev, in adm8211_free_rings()
1510 static int adm8211_start(struct ieee80211_hw *dev) in adm8211_start() argument
1512 struct adm8211_priv *priv = dev->priv; in adm8211_start()
1516 retval = adm8211_hw_reset(dev); in adm8211_start()
1518 wiphy_err(dev->wiphy, "hardware reset failed\n"); in adm8211_start()
1522 retval = adm8211_init_rings(dev); in adm8211_start()
1524 wiphy_err(dev->wiphy, "failed to initialize rings\n"); in adm8211_start()
1529 adm8211_hw_init(dev); in adm8211_start()
1530 adm8211_rf_set_channel(dev, priv->channel); in adm8211_start()
1533 IRQF_SHARED, "adm8211", dev); in adm8211_start()
1535 wiphy_err(dev->wiphy, "failed to register IRQ handler\n"); in adm8211_start()
1543 adm8211_update_mode(dev); in adm8211_start()
1546 adm8211_set_interval(dev, 100, 10); in adm8211_start()
1553 static void adm8211_stop(struct ieee80211_hw *dev) in adm8211_stop() argument
1555 struct adm8211_priv *priv = dev->priv; in adm8211_stop()
1563 free_irq(priv->pdev->irq, dev); in adm8211_stop()
1565 adm8211_free_rings(dev); in adm8211_stop()
1621 static int adm8211_tx_raw(struct ieee80211_hw *dev, struct sk_buff *skb, in adm8211_tx_raw() argument
1625 struct adm8211_priv *priv = dev->priv; in adm8211_tx_raw()
1631 mapping = dma_map_single(&priv->pdev->dev, skb->data, skb->len, in adm8211_tx_raw()
1633 if (dma_mapping_error(&priv->pdev->dev, mapping)) in adm8211_tx_raw()
1644 ieee80211_stop_queue(dev, 0); in adm8211_tx_raw()
1672 static void adm8211_tx(struct ieee80211_hw *dev, in adm8211_tx() argument
1681 struct ieee80211_rate *txrate = ieee80211_get_tx_rate(dev, info); in adm8211_tx()
1722 if (adm8211_tx_raw(dev, skb, plcp_signal, hdrlen)) { in adm8211_tx()
1724 ieee80211_free_txskb(dev, skb); in adm8211_tx()
1728 static int adm8211_alloc_rings(struct ieee80211_hw *dev) in adm8211_alloc_rings() argument
1730 struct adm8211_priv *priv = dev->priv; in adm8211_alloc_rings()
1744 priv->rx_ring = dma_alloc_coherent(&priv->pdev->dev, ring_size, in adm8211_alloc_rings()
1779 struct ieee80211_hw *dev; in adm8211_probe() local
1820 err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); in adm8211_probe()
1829 dev = ieee80211_alloc_hw(sizeof(*priv), &adm8211_ops); in adm8211_probe()
1830 if (!dev) { in adm8211_probe()
1836 priv = dev->priv; in adm8211_probe()
1841 SET_IEEE80211_DEV(dev, &pdev->dev); in adm8211_probe()
1843 pci_set_drvdata(pdev, dev); in adm8211_probe()
1859 err = adm8211_alloc_rings(dev); in adm8211_probe()
1875 SET_IEEE80211_PERM_ADDR(dev, perm_addr); in adm8211_probe()
1877 dev->extra_tx_headroom = sizeof(struct adm8211_tx_hdr); in adm8211_probe()
1879 ieee80211_hw_set(dev, SIGNAL_UNSPEC); in adm8211_probe()
1880 dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); in adm8211_probe()
1882 dev->max_signal = 100; /* FIXME: find better value */ in adm8211_probe()
1884 dev->queues = 1; /* ADM8211C supports more, maybe ADM8211B too */ in adm8211_probe()
1902 err = adm8211_read_eeprom(dev); in adm8211_probe()
1911 dev->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band; in adm8211_probe()
1913 wiphy_ext_feature_set(dev->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); in adm8211_probe()
1915 err = ieee80211_register_hw(dev); in adm8211_probe()
1922 wiphy_info(dev->wiphy, "hwaddr %pM, Rev 0x%02x\n", in adm8211_probe()
1923 dev->wiphy->perm_addr, pdev->revision); in adm8211_probe()
1931 dma_free_coherent(&pdev->dev, in adm8211_probe()
1941 ieee80211_free_hw(dev); in adm8211_probe()
1954 struct ieee80211_hw *dev = pci_get_drvdata(pdev); in adm8211_remove() local
1957 if (!dev) in adm8211_remove()
1960 ieee80211_unregister_hw(dev); in adm8211_remove()
1962 priv = dev->priv; in adm8211_remove()
1964 dma_free_coherent(&pdev->dev, in adm8211_remove()
1974 ieee80211_free_hw(dev); in adm8211_remove()