Lines Matching refs:rt2x00dev
529 int (*probe_hw) (struct rt2x00_dev *rt2x00dev);
530 char *(*get_firmware_name) (struct rt2x00_dev *rt2x00dev);
531 int (*check_firmware) (struct rt2x00_dev *rt2x00dev,
533 int (*load_firmware) (struct rt2x00_dev *rt2x00dev,
539 int (*initialize) (struct rt2x00_dev *rt2x00dev);
540 void (*uninitialize) (struct rt2x00_dev *rt2x00dev);
551 int (*set_device_state) (struct rt2x00_dev *rt2x00dev,
553 int (*rfkill_poll) (struct rt2x00_dev *rt2x00dev);
554 void (*link_stats) (struct rt2x00_dev *rt2x00dev,
556 void (*reset_tuner) (struct rt2x00_dev *rt2x00dev,
558 void (*link_tuner) (struct rt2x00_dev *rt2x00dev,
560 void (*gain_calibration) (struct rt2x00_dev *rt2x00dev);
561 void (*vco_calibration) (struct rt2x00_dev *rt2x00dev);
566 void (*watchdog) (struct rt2x00_dev *rt2x00dev);
594 int (*config_shared_key) (struct rt2x00_dev *rt2x00dev,
597 int (*config_pairwise_key) (struct rt2x00_dev *rt2x00dev,
600 void (*config_filter) (struct rt2x00_dev *rt2x00dev,
602 void (*config_intf) (struct rt2x00_dev *rt2x00dev,
610 void (*config_erp) (struct rt2x00_dev *rt2x00dev,
613 void (*config_ant) (struct rt2x00_dev *rt2x00dev,
615 void (*config) (struct rt2x00_dev *rt2x00dev,
618 void (*pre_reset_hw) (struct rt2x00_dev *rt2x00dev);
619 int (*sta_add) (struct rt2x00_dev *rt2x00dev,
622 int (*sta_remove) (struct rt2x00_dev *rt2x00dev,
1049 static inline u32 rt2x00_rf_read(struct rt2x00_dev *rt2x00dev, in rt2x00_rf_read() argument
1052 BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); in rt2x00_rf_read()
1053 return rt2x00dev->rf[word - 1]; in rt2x00_rf_read()
1056 static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev, in rt2x00_rf_write() argument
1059 BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); in rt2x00_rf_write()
1060 rt2x00dev->rf[word - 1] = data; in rt2x00_rf_write()
1066 static inline void *rt2x00_eeprom_addr(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_addr() argument
1069 return (void *)&rt2x00dev->eeprom[word]; in rt2x00_eeprom_addr()
1072 static inline u16 rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_read() argument
1075 return le16_to_cpu(rt2x00dev->eeprom[word]); in rt2x00_eeprom_read()
1078 static inline void rt2x00_eeprom_write(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_write() argument
1081 rt2x00dev->eeprom[word] = cpu_to_le16(data); in rt2x00_eeprom_write()
1084 static inline u8 rt2x00_eeprom_byte(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_byte() argument
1087 return *(((u8 *)rt2x00dev->eeprom) + byte); in rt2x00_eeprom_byte()
1093 static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev, in rt2x00_set_chip() argument
1096 rt2x00dev->chip.rt = rt; in rt2x00_set_chip()
1097 rt2x00dev->chip.rf = rf; in rt2x00_set_chip()
1098 rt2x00dev->chip.rev = rev; in rt2x00_set_chip()
1100 rt2x00_info(rt2x00dev, "Chipset detected - rt: %04x, rf: %04x, rev: %04x\n", in rt2x00_set_chip()
1101 rt2x00dev->chip.rt, rt2x00dev->chip.rf, in rt2x00_set_chip()
1102 rt2x00dev->chip.rev); in rt2x00_set_chip()
1105 static inline void rt2x00_set_rt(struct rt2x00_dev *rt2x00dev, in rt2x00_set_rt() argument
1108 rt2x00dev->chip.rt = rt; in rt2x00_set_rt()
1109 rt2x00dev->chip.rev = rev; in rt2x00_set_rt()
1111 rt2x00_info(rt2x00dev, "RT chipset %04x, rev %04x detected\n", in rt2x00_set_rt()
1112 rt2x00dev->chip.rt, rt2x00dev->chip.rev); in rt2x00_set_rt()
1115 static inline void rt2x00_set_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) in rt2x00_set_rf() argument
1117 rt2x00dev->chip.rf = rf; in rt2x00_set_rf()
1119 rt2x00_info(rt2x00dev, "RF chipset %04x detected\n", in rt2x00_set_rf()
1120 rt2x00dev->chip.rf); in rt2x00_set_rf()
1123 static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt) in rt2x00_rt() argument
1125 return (rt2x00dev->chip.rt == rt); in rt2x00_rt()
1128 static inline bool rt2x00_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) in rt2x00_rf() argument
1130 return (rt2x00dev->chip.rf == rf); in rt2x00_rf()
1133 static inline u16 rt2x00_rev(struct rt2x00_dev *rt2x00dev) in rt2x00_rev() argument
1135 return rt2x00dev->chip.rev; in rt2x00_rev()
1138 static inline bool rt2x00_rt_rev(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev() argument
1141 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) == rev); in rt2x00_rt_rev()
1144 static inline bool rt2x00_rt_rev_lt(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev_lt() argument
1147 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) < rev); in rt2x00_rt_rev_lt()
1150 static inline bool rt2x00_rt_rev_gte(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev_gte() argument
1153 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) >= rev); in rt2x00_rt_rev_gte()
1156 static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, in rt2x00_set_chip_intf() argument
1159 rt2x00dev->chip.intf = intf; in rt2x00_set_chip_intf()
1162 static inline bool rt2x00_intf(struct rt2x00_dev *rt2x00dev, in rt2x00_intf() argument
1165 return (rt2x00dev->chip.intf == intf); in rt2x00_intf()
1168 static inline bool rt2x00_is_pci(struct rt2x00_dev *rt2x00dev) in rt2x00_is_pci() argument
1170 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI) || in rt2x00_is_pci()
1171 rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); in rt2x00_is_pci()
1174 static inline bool rt2x00_is_pcie(struct rt2x00_dev *rt2x00dev) in rt2x00_is_pcie() argument
1176 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); in rt2x00_is_pcie()
1179 static inline bool rt2x00_is_usb(struct rt2x00_dev *rt2x00dev) in rt2x00_is_usb() argument
1181 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_USB); in rt2x00_is_usb()
1184 static inline bool rt2x00_is_soc(struct rt2x00_dev *rt2x00dev) in rt2x00_is_soc() argument
1186 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC); in rt2x00_is_soc()
1192 rt2x00_has_cap_flag(struct rt2x00_dev *rt2x00dev, in rt2x00_has_cap_flag() argument
1195 return test_bit(cap_flag, &rt2x00dev->cap_flags); in rt2x00_has_cap_flag()
1199 rt2x00_has_cap_hw_crypto(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_hw_crypto() argument
1201 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_HW_CRYPTO); in rt2x00_has_cap_hw_crypto()
1205 rt2x00_has_cap_power_limit(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_power_limit() argument
1207 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_POWER_LIMIT); in rt2x00_has_cap_power_limit()
1211 rt2x00_has_cap_control_filters(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_control_filters() argument
1213 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_CONTROL_FILTERS); in rt2x00_has_cap_control_filters()
1217 rt2x00_has_cap_control_filter_pspoll(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_control_filter_pspoll() argument
1219 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_CONTROL_FILTER_PSPOLL); in rt2x00_has_cap_control_filter_pspoll()
1223 rt2x00_has_cap_pre_tbtt_interrupt(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_pre_tbtt_interrupt() argument
1225 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_PRE_TBTT_INTERRUPT); in rt2x00_has_cap_pre_tbtt_interrupt()
1229 rt2x00_has_cap_link_tuning(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_link_tuning() argument
1231 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_LINK_TUNING); in rt2x00_has_cap_link_tuning()
1235 rt2x00_has_cap_frame_type(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_frame_type() argument
1237 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_FRAME_TYPE); in rt2x00_has_cap_frame_type()
1241 rt2x00_has_cap_rf_sequence(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_rf_sequence() argument
1243 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_RF_SEQUENCE); in rt2x00_has_cap_rf_sequence()
1247 rt2x00_has_cap_external_lna_a(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_external_lna_a() argument
1249 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_LNA_A); in rt2x00_has_cap_external_lna_a()
1253 rt2x00_has_cap_external_lna_bg(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_external_lna_bg() argument
1255 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_LNA_BG); in rt2x00_has_cap_external_lna_bg()
1259 rt2x00_has_cap_external_pa(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_external_pa() argument
1261 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_PA_TX0); in rt2x00_has_cap_external_pa()
1265 rt2x00_has_cap_double_antenna(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_double_antenna() argument
1267 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_DOUBLE_ANTENNA); in rt2x00_has_cap_double_antenna()
1271 rt2x00_has_cap_bt_coexist(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_bt_coexist() argument
1273 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_BT_COEXIST); in rt2x00_has_cap_bt_coexist()
1277 rt2x00_has_cap_vco_recalibration(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_vco_recalibration() argument
1279 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_VCO_RECALIBRATION); in rt2x00_has_cap_vco_recalibration()
1283 rt2x00_has_cap_restart_hw(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_restart_hw() argument
1285 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_RESTART_HW); in rt2x00_has_cap_restart_hw()
1310 rt2x00queue_get_tx_queue(struct rt2x00_dev *rt2x00dev, in rt2x00queue_get_tx_queue() argument
1313 if (queue >= rt2x00dev->ops->tx_queues && queue < IEEE80211_NUM_ACS) in rt2x00queue_get_tx_queue()
1314 queue = rt2x00dev->ops->tx_queues - 1; in rt2x00queue_get_tx_queue()
1316 if (queue < rt2x00dev->ops->tx_queues && rt2x00dev->tx) in rt2x00queue_get_tx_queue()
1317 return &rt2x00dev->tx[queue]; in rt2x00queue_get_tx_queue()
1320 return rt2x00dev->atim; in rt2x00queue_get_tx_queue()
1384 void rt2x00queue_start_queues(struct rt2x00_dev *rt2x00dev);
1393 void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev);
1403 void rt2x00queue_flush_queues(struct rt2x00_dev *rt2x00dev, bool drop);
1415 void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
1418 static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, in rt2x00debug_dump_frame() argument
1428 u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
1430 void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr);
1435 void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev);
1436 void rt2x00lib_pretbtt(struct rt2x00_dev *rt2x00dev);
1503 int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev);
1504 void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev);
1506 int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev);
1507 int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev);