Lines Matching refs:rt2x00dev
539 int (*probe_hw) (struct rt2x00_dev *rt2x00dev);
540 char *(*get_firmware_name) (struct rt2x00_dev *rt2x00dev);
541 int (*check_firmware) (struct rt2x00_dev *rt2x00dev,
543 int (*load_firmware) (struct rt2x00_dev *rt2x00dev,
549 int (*initialize) (struct rt2x00_dev *rt2x00dev);
550 void (*uninitialize) (struct rt2x00_dev *rt2x00dev);
561 int (*set_device_state) (struct rt2x00_dev *rt2x00dev,
563 int (*rfkill_poll) (struct rt2x00_dev *rt2x00dev);
564 void (*link_stats) (struct rt2x00_dev *rt2x00dev,
566 void (*reset_tuner) (struct rt2x00_dev *rt2x00dev,
568 void (*link_tuner) (struct rt2x00_dev *rt2x00dev,
570 void (*gain_calibration) (struct rt2x00_dev *rt2x00dev);
571 void (*vco_calibration) (struct rt2x00_dev *rt2x00dev);
576 void (*watchdog) (struct rt2x00_dev *rt2x00dev);
604 int (*config_shared_key) (struct rt2x00_dev *rt2x00dev,
607 int (*config_pairwise_key) (struct rt2x00_dev *rt2x00dev,
610 void (*config_filter) (struct rt2x00_dev *rt2x00dev,
612 void (*config_intf) (struct rt2x00_dev *rt2x00dev,
620 void (*config_erp) (struct rt2x00_dev *rt2x00dev,
623 void (*config_ant) (struct rt2x00_dev *rt2x00dev,
625 void (*config) (struct rt2x00_dev *rt2x00dev,
628 void (*pre_reset_hw) (struct rt2x00_dev *rt2x00dev);
629 int (*sta_add) (struct rt2x00_dev *rt2x00dev,
632 int (*sta_remove) (struct rt2x00_dev *rt2x00dev,
1056 static inline u32 rt2x00_rf_read(struct rt2x00_dev *rt2x00dev, in rt2x00_rf_read() argument
1059 BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); in rt2x00_rf_read()
1060 return rt2x00dev->rf[word - 1]; in rt2x00_rf_read()
1063 static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev, in rt2x00_rf_write() argument
1066 BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); in rt2x00_rf_write()
1067 rt2x00dev->rf[word - 1] = data; in rt2x00_rf_write()
1073 static inline void *rt2x00_eeprom_addr(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_addr() argument
1076 return (void *)&rt2x00dev->eeprom[word]; in rt2x00_eeprom_addr()
1079 static inline u16 rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_read() argument
1082 return le16_to_cpu(rt2x00dev->eeprom[word]); in rt2x00_eeprom_read()
1085 static inline void rt2x00_eeprom_write(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_write() argument
1088 rt2x00dev->eeprom[word] = cpu_to_le16(data); in rt2x00_eeprom_write()
1091 static inline u8 rt2x00_eeprom_byte(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_byte() argument
1094 return *(((u8 *)rt2x00dev->eeprom) + byte); in rt2x00_eeprom_byte()
1100 static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev, in rt2x00_set_chip() argument
1103 rt2x00dev->chip.rt = rt; in rt2x00_set_chip()
1104 rt2x00dev->chip.rf = rf; in rt2x00_set_chip()
1105 rt2x00dev->chip.rev = rev; in rt2x00_set_chip()
1107 rt2x00_info(rt2x00dev, "Chipset detected - rt: %04x, rf: %04x, rev: %04x\n", in rt2x00_set_chip()
1108 rt2x00dev->chip.rt, rt2x00dev->chip.rf, in rt2x00_set_chip()
1109 rt2x00dev->chip.rev); in rt2x00_set_chip()
1112 static inline void rt2x00_set_rt(struct rt2x00_dev *rt2x00dev, in rt2x00_set_rt() argument
1115 rt2x00dev->chip.rt = rt; in rt2x00_set_rt()
1116 rt2x00dev->chip.rev = rev; in rt2x00_set_rt()
1118 rt2x00_info(rt2x00dev, "RT chipset %04x, rev %04x detected\n", in rt2x00_set_rt()
1119 rt2x00dev->chip.rt, rt2x00dev->chip.rev); in rt2x00_set_rt()
1122 static inline void rt2x00_set_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) in rt2x00_set_rf() argument
1124 rt2x00dev->chip.rf = rf; in rt2x00_set_rf()
1126 rt2x00_info(rt2x00dev, "RF chipset %04x detected\n", in rt2x00_set_rf()
1127 rt2x00dev->chip.rf); in rt2x00_set_rf()
1130 static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt) in rt2x00_rt() argument
1132 return (rt2x00dev->chip.rt == rt); in rt2x00_rt()
1135 static inline bool rt2x00_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) in rt2x00_rf() argument
1137 return (rt2x00dev->chip.rf == rf); in rt2x00_rf()
1140 static inline u16 rt2x00_rev(struct rt2x00_dev *rt2x00dev) in rt2x00_rev() argument
1142 return rt2x00dev->chip.rev; in rt2x00_rev()
1145 static inline bool rt2x00_rt_rev(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev() argument
1148 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) == rev); in rt2x00_rt_rev()
1151 static inline bool rt2x00_rt_rev_lt(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev_lt() argument
1154 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) < rev); in rt2x00_rt_rev_lt()
1157 static inline bool rt2x00_rt_rev_gte(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev_gte() argument
1160 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) >= rev); in rt2x00_rt_rev_gte()
1163 static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, in rt2x00_set_chip_intf() argument
1166 rt2x00dev->chip.intf = intf; in rt2x00_set_chip_intf()
1169 static inline bool rt2x00_intf(struct rt2x00_dev *rt2x00dev, in rt2x00_intf() argument
1172 return (rt2x00dev->chip.intf == intf); in rt2x00_intf()
1175 static inline bool rt2x00_is_pci(struct rt2x00_dev *rt2x00dev) in rt2x00_is_pci() argument
1177 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI) || in rt2x00_is_pci()
1178 rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); in rt2x00_is_pci()
1181 static inline bool rt2x00_is_pcie(struct rt2x00_dev *rt2x00dev) in rt2x00_is_pcie() argument
1183 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); in rt2x00_is_pcie()
1186 static inline bool rt2x00_is_usb(struct rt2x00_dev *rt2x00dev) in rt2x00_is_usb() argument
1188 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_USB); in rt2x00_is_usb()
1191 static inline bool rt2x00_is_soc(struct rt2x00_dev *rt2x00dev) in rt2x00_is_soc() argument
1193 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC); in rt2x00_is_soc()
1199 rt2x00_has_cap_flag(struct rt2x00_dev *rt2x00dev, in rt2x00_has_cap_flag() argument
1202 return test_bit(cap_flag, &rt2x00dev->cap_flags); in rt2x00_has_cap_flag()
1206 rt2x00_has_cap_hw_crypto(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_hw_crypto() argument
1208 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_HW_CRYPTO); in rt2x00_has_cap_hw_crypto()
1212 rt2x00_has_cap_power_limit(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_power_limit() argument
1214 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_POWER_LIMIT); in rt2x00_has_cap_power_limit()
1218 rt2x00_has_cap_control_filters(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_control_filters() argument
1220 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_CONTROL_FILTERS); in rt2x00_has_cap_control_filters()
1224 rt2x00_has_cap_control_filter_pspoll(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_control_filter_pspoll() argument
1226 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_CONTROL_FILTER_PSPOLL); in rt2x00_has_cap_control_filter_pspoll()
1230 rt2x00_has_cap_pre_tbtt_interrupt(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_pre_tbtt_interrupt() argument
1232 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_PRE_TBTT_INTERRUPT); in rt2x00_has_cap_pre_tbtt_interrupt()
1236 rt2x00_has_cap_link_tuning(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_link_tuning() argument
1238 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_LINK_TUNING); in rt2x00_has_cap_link_tuning()
1242 rt2x00_has_cap_frame_type(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_frame_type() argument
1244 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_FRAME_TYPE); in rt2x00_has_cap_frame_type()
1248 rt2x00_has_cap_rf_sequence(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_rf_sequence() argument
1250 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_RF_SEQUENCE); in rt2x00_has_cap_rf_sequence()
1254 rt2x00_has_cap_external_lna_a(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_external_lna_a() argument
1256 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_LNA_A); in rt2x00_has_cap_external_lna_a()
1260 rt2x00_has_cap_external_lna_bg(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_external_lna_bg() argument
1262 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_LNA_BG); in rt2x00_has_cap_external_lna_bg()
1266 rt2x00_has_cap_double_antenna(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_double_antenna() argument
1268 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_DOUBLE_ANTENNA); in rt2x00_has_cap_double_antenna()
1272 rt2x00_has_cap_bt_coexist(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_bt_coexist() argument
1274 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_BT_COEXIST); in rt2x00_has_cap_bt_coexist()
1278 rt2x00_has_cap_vco_recalibration(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_vco_recalibration() argument
1280 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_VCO_RECALIBRATION); in rt2x00_has_cap_vco_recalibration()
1284 rt2x00_has_cap_restart_hw(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_restart_hw() argument
1286 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_RESTART_HW); in rt2x00_has_cap_restart_hw()
1311 rt2x00queue_get_tx_queue(struct rt2x00_dev *rt2x00dev, in rt2x00queue_get_tx_queue() argument
1314 if (queue < rt2x00dev->ops->tx_queues && rt2x00dev->tx) in rt2x00queue_get_tx_queue()
1315 return &rt2x00dev->tx[queue]; in rt2x00queue_get_tx_queue()
1318 return rt2x00dev->atim; in rt2x00queue_get_tx_queue()
1382 void rt2x00queue_start_queues(struct rt2x00_dev *rt2x00dev);
1391 void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev);
1401 void rt2x00queue_flush_queues(struct rt2x00_dev *rt2x00dev, bool drop);
1413 void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
1416 static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, in rt2x00debug_dump_frame() argument
1426 u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
1428 void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr);
1433 void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev);
1434 void rt2x00lib_pretbtt(struct rt2x00_dev *rt2x00dev);
1498 int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev);
1499 void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev);
1501 int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev);
1502 int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev);