Lines Matching refs:rt2x00dev
534 int (*probe_hw) (struct rt2x00_dev *rt2x00dev);
535 char *(*get_firmware_name) (struct rt2x00_dev *rt2x00dev);
536 int (*check_firmware) (struct rt2x00_dev *rt2x00dev,
538 int (*load_firmware) (struct rt2x00_dev *rt2x00dev,
544 int (*initialize) (struct rt2x00_dev *rt2x00dev);
545 void (*uninitialize) (struct rt2x00_dev *rt2x00dev);
556 int (*set_device_state) (struct rt2x00_dev *rt2x00dev,
558 int (*rfkill_poll) (struct rt2x00_dev *rt2x00dev);
559 void (*link_stats) (struct rt2x00_dev *rt2x00dev,
561 void (*reset_tuner) (struct rt2x00_dev *rt2x00dev,
563 void (*link_tuner) (struct rt2x00_dev *rt2x00dev,
565 void (*gain_calibration) (struct rt2x00_dev *rt2x00dev);
566 void (*vco_calibration) (struct rt2x00_dev *rt2x00dev);
571 void (*watchdog) (struct rt2x00_dev *rt2x00dev);
599 int (*config_shared_key) (struct rt2x00_dev *rt2x00dev,
602 int (*config_pairwise_key) (struct rt2x00_dev *rt2x00dev,
605 void (*config_filter) (struct rt2x00_dev *rt2x00dev,
607 void (*config_intf) (struct rt2x00_dev *rt2x00dev,
615 void (*config_erp) (struct rt2x00_dev *rt2x00dev,
618 void (*config_ant) (struct rt2x00_dev *rt2x00dev,
620 void (*config) (struct rt2x00_dev *rt2x00dev,
623 int (*sta_add) (struct rt2x00_dev *rt2x00dev,
626 int (*sta_remove) (struct rt2x00_dev *rt2x00dev,
1034 static inline void rt2x00_rf_read(struct rt2x00_dev *rt2x00dev, in rt2x00_rf_read() argument
1037 BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); in rt2x00_rf_read()
1038 *data = rt2x00dev->rf[word - 1]; in rt2x00_rf_read()
1041 static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev, in rt2x00_rf_write() argument
1044 BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); in rt2x00_rf_write()
1045 rt2x00dev->rf[word - 1] = data; in rt2x00_rf_write()
1051 static inline void *rt2x00_eeprom_addr(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_addr() argument
1054 return (void *)&rt2x00dev->eeprom[word]; in rt2x00_eeprom_addr()
1057 static inline void rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_read() argument
1060 *data = le16_to_cpu(rt2x00dev->eeprom[word]); in rt2x00_eeprom_read()
1063 static inline void rt2x00_eeprom_write(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_write() argument
1066 rt2x00dev->eeprom[word] = cpu_to_le16(data); in rt2x00_eeprom_write()
1069 static inline u8 rt2x00_eeprom_byte(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_byte() argument
1072 return *(((u8 *)rt2x00dev->eeprom) + byte); in rt2x00_eeprom_byte()
1078 static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev, in rt2x00_set_chip() argument
1081 rt2x00dev->chip.rt = rt; in rt2x00_set_chip()
1082 rt2x00dev->chip.rf = rf; in rt2x00_set_chip()
1083 rt2x00dev->chip.rev = rev; in rt2x00_set_chip()
1085 rt2x00_info(rt2x00dev, "Chipset detected - rt: %04x, rf: %04x, rev: %04x\n", in rt2x00_set_chip()
1086 rt2x00dev->chip.rt, rt2x00dev->chip.rf, in rt2x00_set_chip()
1087 rt2x00dev->chip.rev); in rt2x00_set_chip()
1090 static inline void rt2x00_set_rt(struct rt2x00_dev *rt2x00dev, in rt2x00_set_rt() argument
1093 rt2x00dev->chip.rt = rt; in rt2x00_set_rt()
1094 rt2x00dev->chip.rev = rev; in rt2x00_set_rt()
1096 rt2x00_info(rt2x00dev, "RT chipset %04x, rev %04x detected\n", in rt2x00_set_rt()
1097 rt2x00dev->chip.rt, rt2x00dev->chip.rev); in rt2x00_set_rt()
1100 static inline void rt2x00_set_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) in rt2x00_set_rf() argument
1102 rt2x00dev->chip.rf = rf; in rt2x00_set_rf()
1104 rt2x00_info(rt2x00dev, "RF chipset %04x detected\n", in rt2x00_set_rf()
1105 rt2x00dev->chip.rf); in rt2x00_set_rf()
1108 static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt) in rt2x00_rt() argument
1110 return (rt2x00dev->chip.rt == rt); in rt2x00_rt()
1113 static inline bool rt2x00_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) in rt2x00_rf() argument
1115 return (rt2x00dev->chip.rf == rf); in rt2x00_rf()
1118 static inline u16 rt2x00_rev(struct rt2x00_dev *rt2x00dev) in rt2x00_rev() argument
1120 return rt2x00dev->chip.rev; in rt2x00_rev()
1123 static inline bool rt2x00_rt_rev(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev() argument
1126 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) == rev); in rt2x00_rt_rev()
1129 static inline bool rt2x00_rt_rev_lt(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev_lt() argument
1132 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) < rev); in rt2x00_rt_rev_lt()
1135 static inline bool rt2x00_rt_rev_gte(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev_gte() argument
1138 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) >= rev); in rt2x00_rt_rev_gte()
1141 static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, in rt2x00_set_chip_intf() argument
1144 rt2x00dev->chip.intf = intf; in rt2x00_set_chip_intf()
1147 static inline bool rt2x00_intf(struct rt2x00_dev *rt2x00dev, in rt2x00_intf() argument
1150 return (rt2x00dev->chip.intf == intf); in rt2x00_intf()
1153 static inline bool rt2x00_is_pci(struct rt2x00_dev *rt2x00dev) in rt2x00_is_pci() argument
1155 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI) || in rt2x00_is_pci()
1156 rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); in rt2x00_is_pci()
1159 static inline bool rt2x00_is_pcie(struct rt2x00_dev *rt2x00dev) in rt2x00_is_pcie() argument
1161 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); in rt2x00_is_pcie()
1164 static inline bool rt2x00_is_usb(struct rt2x00_dev *rt2x00dev) in rt2x00_is_usb() argument
1166 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_USB); in rt2x00_is_usb()
1169 static inline bool rt2x00_is_soc(struct rt2x00_dev *rt2x00dev) in rt2x00_is_soc() argument
1171 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC); in rt2x00_is_soc()
1177 rt2x00_has_cap_flag(struct rt2x00_dev *rt2x00dev, in rt2x00_has_cap_flag() argument
1180 return test_bit(cap_flag, &rt2x00dev->cap_flags); in rt2x00_has_cap_flag()
1184 rt2x00_has_cap_hw_crypto(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_hw_crypto() argument
1186 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_HW_CRYPTO); in rt2x00_has_cap_hw_crypto()
1190 rt2x00_has_cap_power_limit(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_power_limit() argument
1192 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_POWER_LIMIT); in rt2x00_has_cap_power_limit()
1196 rt2x00_has_cap_control_filters(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_control_filters() argument
1198 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_CONTROL_FILTERS); in rt2x00_has_cap_control_filters()
1202 rt2x00_has_cap_control_filter_pspoll(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_control_filter_pspoll() argument
1204 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_CONTROL_FILTER_PSPOLL); in rt2x00_has_cap_control_filter_pspoll()
1208 rt2x00_has_cap_pre_tbtt_interrupt(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_pre_tbtt_interrupt() argument
1210 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_PRE_TBTT_INTERRUPT); in rt2x00_has_cap_pre_tbtt_interrupt()
1214 rt2x00_has_cap_link_tuning(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_link_tuning() argument
1216 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_LINK_TUNING); in rt2x00_has_cap_link_tuning()
1220 rt2x00_has_cap_frame_type(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_frame_type() argument
1222 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_FRAME_TYPE); in rt2x00_has_cap_frame_type()
1226 rt2x00_has_cap_rf_sequence(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_rf_sequence() argument
1228 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_RF_SEQUENCE); in rt2x00_has_cap_rf_sequence()
1232 rt2x00_has_cap_external_lna_a(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_external_lna_a() argument
1234 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_LNA_A); in rt2x00_has_cap_external_lna_a()
1238 rt2x00_has_cap_external_lna_bg(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_external_lna_bg() argument
1240 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_LNA_BG); in rt2x00_has_cap_external_lna_bg()
1244 rt2x00_has_cap_double_antenna(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_double_antenna() argument
1246 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_DOUBLE_ANTENNA); in rt2x00_has_cap_double_antenna()
1250 rt2x00_has_cap_bt_coexist(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_bt_coexist() argument
1252 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_BT_COEXIST); in rt2x00_has_cap_bt_coexist()
1256 rt2x00_has_cap_vco_recalibration(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_vco_recalibration() argument
1258 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_VCO_RECALIBRATION); in rt2x00_has_cap_vco_recalibration()
1283 rt2x00queue_get_tx_queue(struct rt2x00_dev *rt2x00dev, in rt2x00queue_get_tx_queue() argument
1286 if (queue < rt2x00dev->ops->tx_queues && rt2x00dev->tx) in rt2x00queue_get_tx_queue()
1287 return &rt2x00dev->tx[queue]; in rt2x00queue_get_tx_queue()
1290 return rt2x00dev->atim; in rt2x00queue_get_tx_queue()
1354 void rt2x00queue_start_queues(struct rt2x00_dev *rt2x00dev);
1363 void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev);
1373 void rt2x00queue_flush_queues(struct rt2x00_dev *rt2x00dev, bool drop);
1385 void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
1388 static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, in rt2x00debug_dump_frame() argument
1398 u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
1404 void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev);
1405 void rt2x00lib_pretbtt(struct rt2x00_dev *rt2x00dev);
1469 int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev);
1470 void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev);
1472 int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state);
1473 int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev);