Lines Matching refs:rt2x00dev
536 int (*probe_hw) (struct rt2x00_dev *rt2x00dev);
537 char *(*get_firmware_name) (struct rt2x00_dev *rt2x00dev);
538 int (*check_firmware) (struct rt2x00_dev *rt2x00dev,
540 int (*load_firmware) (struct rt2x00_dev *rt2x00dev,
546 int (*initialize) (struct rt2x00_dev *rt2x00dev);
547 void (*uninitialize) (struct rt2x00_dev *rt2x00dev);
558 int (*set_device_state) (struct rt2x00_dev *rt2x00dev,
560 int (*rfkill_poll) (struct rt2x00_dev *rt2x00dev);
561 void (*link_stats) (struct rt2x00_dev *rt2x00dev,
563 void (*reset_tuner) (struct rt2x00_dev *rt2x00dev,
565 void (*link_tuner) (struct rt2x00_dev *rt2x00dev,
567 void (*gain_calibration) (struct rt2x00_dev *rt2x00dev);
568 void (*vco_calibration) (struct rt2x00_dev *rt2x00dev);
573 void (*watchdog) (struct rt2x00_dev *rt2x00dev);
601 int (*config_shared_key) (struct rt2x00_dev *rt2x00dev,
604 int (*config_pairwise_key) (struct rt2x00_dev *rt2x00dev,
607 void (*config_filter) (struct rt2x00_dev *rt2x00dev,
609 void (*config_intf) (struct rt2x00_dev *rt2x00dev,
617 void (*config_erp) (struct rt2x00_dev *rt2x00dev,
620 void (*config_ant) (struct rt2x00_dev *rt2x00dev,
622 void (*config) (struct rt2x00_dev *rt2x00dev,
625 int (*sta_add) (struct rt2x00_dev *rt2x00dev,
628 int (*sta_remove) (struct rt2x00_dev *rt2x00dev,
1036 static inline void rt2x00_rf_read(struct rt2x00_dev *rt2x00dev, in rt2x00_rf_read() argument
1039 BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); in rt2x00_rf_read()
1040 *data = rt2x00dev->rf[word - 1]; in rt2x00_rf_read()
1043 static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev, in rt2x00_rf_write() argument
1046 BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); in rt2x00_rf_write()
1047 rt2x00dev->rf[word - 1] = data; in rt2x00_rf_write()
1053 static inline void *rt2x00_eeprom_addr(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_addr() argument
1056 return (void *)&rt2x00dev->eeprom[word]; in rt2x00_eeprom_addr()
1059 static inline void rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_read() argument
1062 *data = le16_to_cpu(rt2x00dev->eeprom[word]); in rt2x00_eeprom_read()
1065 static inline void rt2x00_eeprom_write(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_write() argument
1068 rt2x00dev->eeprom[word] = cpu_to_le16(data); in rt2x00_eeprom_write()
1071 static inline u8 rt2x00_eeprom_byte(struct rt2x00_dev *rt2x00dev, in rt2x00_eeprom_byte() argument
1074 return *(((u8 *)rt2x00dev->eeprom) + byte); in rt2x00_eeprom_byte()
1080 static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev, in rt2x00_set_chip() argument
1083 rt2x00dev->chip.rt = rt; in rt2x00_set_chip()
1084 rt2x00dev->chip.rf = rf; in rt2x00_set_chip()
1085 rt2x00dev->chip.rev = rev; in rt2x00_set_chip()
1087 rt2x00_info(rt2x00dev, "Chipset detected - rt: %04x, rf: %04x, rev: %04x\n", in rt2x00_set_chip()
1088 rt2x00dev->chip.rt, rt2x00dev->chip.rf, in rt2x00_set_chip()
1089 rt2x00dev->chip.rev); in rt2x00_set_chip()
1092 static inline void rt2x00_set_rt(struct rt2x00_dev *rt2x00dev, in rt2x00_set_rt() argument
1095 rt2x00dev->chip.rt = rt; in rt2x00_set_rt()
1096 rt2x00dev->chip.rev = rev; in rt2x00_set_rt()
1098 rt2x00_info(rt2x00dev, "RT chipset %04x, rev %04x detected\n", in rt2x00_set_rt()
1099 rt2x00dev->chip.rt, rt2x00dev->chip.rev); in rt2x00_set_rt()
1102 static inline void rt2x00_set_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) in rt2x00_set_rf() argument
1104 rt2x00dev->chip.rf = rf; in rt2x00_set_rf()
1106 rt2x00_info(rt2x00dev, "RF chipset %04x detected\n", in rt2x00_set_rf()
1107 rt2x00dev->chip.rf); in rt2x00_set_rf()
1110 static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt) in rt2x00_rt() argument
1112 return (rt2x00dev->chip.rt == rt); in rt2x00_rt()
1115 static inline bool rt2x00_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) in rt2x00_rf() argument
1117 return (rt2x00dev->chip.rf == rf); in rt2x00_rf()
1120 static inline u16 rt2x00_rev(struct rt2x00_dev *rt2x00dev) in rt2x00_rev() argument
1122 return rt2x00dev->chip.rev; in rt2x00_rev()
1125 static inline bool rt2x00_rt_rev(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev() argument
1128 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) == rev); in rt2x00_rt_rev()
1131 static inline bool rt2x00_rt_rev_lt(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev_lt() argument
1134 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) < rev); in rt2x00_rt_rev_lt()
1137 static inline bool rt2x00_rt_rev_gte(struct rt2x00_dev *rt2x00dev, in rt2x00_rt_rev_gte() argument
1140 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) >= rev); in rt2x00_rt_rev_gte()
1143 static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, in rt2x00_set_chip_intf() argument
1146 rt2x00dev->chip.intf = intf; in rt2x00_set_chip_intf()
1149 static inline bool rt2x00_intf(struct rt2x00_dev *rt2x00dev, in rt2x00_intf() argument
1152 return (rt2x00dev->chip.intf == intf); in rt2x00_intf()
1155 static inline bool rt2x00_is_pci(struct rt2x00_dev *rt2x00dev) in rt2x00_is_pci() argument
1157 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI) || in rt2x00_is_pci()
1158 rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); in rt2x00_is_pci()
1161 static inline bool rt2x00_is_pcie(struct rt2x00_dev *rt2x00dev) in rt2x00_is_pcie() argument
1163 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); in rt2x00_is_pcie()
1166 static inline bool rt2x00_is_usb(struct rt2x00_dev *rt2x00dev) in rt2x00_is_usb() argument
1168 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_USB); in rt2x00_is_usb()
1171 static inline bool rt2x00_is_soc(struct rt2x00_dev *rt2x00dev) in rt2x00_is_soc() argument
1173 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC); in rt2x00_is_soc()
1179 rt2x00_has_cap_flag(struct rt2x00_dev *rt2x00dev, in rt2x00_has_cap_flag() argument
1182 return test_bit(cap_flag, &rt2x00dev->cap_flags); in rt2x00_has_cap_flag()
1186 rt2x00_has_cap_hw_crypto(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_hw_crypto() argument
1188 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_HW_CRYPTO); in rt2x00_has_cap_hw_crypto()
1192 rt2x00_has_cap_power_limit(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_power_limit() argument
1194 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_POWER_LIMIT); in rt2x00_has_cap_power_limit()
1198 rt2x00_has_cap_control_filters(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_control_filters() argument
1200 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_CONTROL_FILTERS); in rt2x00_has_cap_control_filters()
1204 rt2x00_has_cap_control_filter_pspoll(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_control_filter_pspoll() argument
1206 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_CONTROL_FILTER_PSPOLL); in rt2x00_has_cap_control_filter_pspoll()
1210 rt2x00_has_cap_pre_tbtt_interrupt(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_pre_tbtt_interrupt() argument
1212 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_PRE_TBTT_INTERRUPT); in rt2x00_has_cap_pre_tbtt_interrupt()
1216 rt2x00_has_cap_link_tuning(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_link_tuning() argument
1218 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_LINK_TUNING); in rt2x00_has_cap_link_tuning()
1222 rt2x00_has_cap_frame_type(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_frame_type() argument
1224 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_FRAME_TYPE); in rt2x00_has_cap_frame_type()
1228 rt2x00_has_cap_rf_sequence(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_rf_sequence() argument
1230 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_RF_SEQUENCE); in rt2x00_has_cap_rf_sequence()
1234 rt2x00_has_cap_external_lna_a(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_external_lna_a() argument
1236 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_LNA_A); in rt2x00_has_cap_external_lna_a()
1240 rt2x00_has_cap_external_lna_bg(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_external_lna_bg() argument
1242 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_LNA_BG); in rt2x00_has_cap_external_lna_bg()
1246 rt2x00_has_cap_double_antenna(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_double_antenna() argument
1248 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_DOUBLE_ANTENNA); in rt2x00_has_cap_double_antenna()
1252 rt2x00_has_cap_bt_coexist(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_bt_coexist() argument
1254 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_BT_COEXIST); in rt2x00_has_cap_bt_coexist()
1258 rt2x00_has_cap_vco_recalibration(struct rt2x00_dev *rt2x00dev) in rt2x00_has_cap_vco_recalibration() argument
1260 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_VCO_RECALIBRATION); in rt2x00_has_cap_vco_recalibration()
1285 rt2x00queue_get_tx_queue(struct rt2x00_dev *rt2x00dev, in rt2x00queue_get_tx_queue() argument
1288 if (queue < rt2x00dev->ops->tx_queues && rt2x00dev->tx) in rt2x00queue_get_tx_queue()
1289 return &rt2x00dev->tx[queue]; in rt2x00queue_get_tx_queue()
1292 return rt2x00dev->atim; in rt2x00queue_get_tx_queue()
1356 void rt2x00queue_start_queues(struct rt2x00_dev *rt2x00dev);
1365 void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev);
1375 void rt2x00queue_flush_queues(struct rt2x00_dev *rt2x00dev, bool drop);
1387 void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
1390 static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, in rt2x00debug_dump_frame() argument
1400 u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
1406 void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev);
1407 void rt2x00lib_pretbtt(struct rt2x00_dev *rt2x00dev);
1471 int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev);
1472 void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev);
1474 int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state);
1475 int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev);