Lines Matching defs: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,
1059 static inline u32 rt2x00_rf_read(struct rt2x00_dev *rt2x00dev,
1062 BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32));
1063 return rt2x00dev->rf[word - 1];
1066 static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev,
1069 BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32));
1070 rt2x00dev->rf[word - 1] = data;
1076 static inline void *rt2x00_eeprom_addr(struct rt2x00_dev *rt2x00dev,
1079 return (void *)&rt2x00dev->eeprom[word];
1082 static inline u16 rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev,
1085 return le16_to_cpu(rt2x00dev->eeprom[word]);
1088 static inline void rt2x00_eeprom_write(struct rt2x00_dev *rt2x00dev,
1091 rt2x00dev->eeprom[word] = cpu_to_le16(data);
1094 static inline u8 rt2x00_eeprom_byte(struct rt2x00_dev *rt2x00dev,
1097 return *(((u8 *)rt2x00dev->eeprom) + byte);
1103 static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev,
1106 rt2x00dev->chip.rt = rt;
1107 rt2x00dev->chip.rf = rf;
1108 rt2x00dev->chip.rev = rev;
1110 rt2x00_info(rt2x00dev, "Chipset detected - rt: %04x, rf: %04x, rev: %04x\n",
1111 rt2x00dev->chip.rt, rt2x00dev->chip.rf,
1112 rt2x00dev->chip.rev);
1115 static inline void rt2x00_set_rt(struct rt2x00_dev *rt2x00dev,
1118 rt2x00dev->chip.rt = rt;
1119 rt2x00dev->chip.rev = rev;
1121 rt2x00_info(rt2x00dev, "RT chipset %04x, rev %04x detected\n",
1122 rt2x00dev->chip.rt, rt2x00dev->chip.rev);
1125 static inline void rt2x00_set_rf(struct rt2x00_dev *rt2x00dev, const u16 rf)
1127 rt2x00dev->chip.rf = rf;
1129 rt2x00_info(rt2x00dev, "RF chipset %04x detected\n",
1130 rt2x00dev->chip.rf);
1133 static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt)
1135 return (rt2x00dev->chip.rt == rt);
1138 static inline bool rt2x00_rf(struct rt2x00_dev *rt2x00dev, const u16 rf)
1140 return (rt2x00dev->chip.rf == rf);
1143 static inline u16 rt2x00_rev(struct rt2x00_dev *rt2x00dev)
1145 return rt2x00dev->chip.rev;
1148 static inline bool rt2x00_rt_rev(struct rt2x00_dev *rt2x00dev,
1151 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) == rev);
1154 static inline bool rt2x00_rt_rev_lt(struct rt2x00_dev *rt2x00dev,
1157 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) < rev);
1160 static inline bool rt2x00_rt_rev_gte(struct rt2x00_dev *rt2x00dev,
1163 return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) >= rev);
1166 static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev,
1169 rt2x00dev->chip.intf = intf;
1172 static inline bool rt2x00_intf(struct rt2x00_dev *rt2x00dev,
1175 return (rt2x00dev->chip.intf == intf);
1178 static inline bool rt2x00_is_pci(struct rt2x00_dev *rt2x00dev)
1180 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI) ||
1181 rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE);
1184 static inline bool rt2x00_is_pcie(struct rt2x00_dev *rt2x00dev)
1186 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE);
1189 static inline bool rt2x00_is_usb(struct rt2x00_dev *rt2x00dev)
1191 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_USB);
1194 static inline bool rt2x00_is_soc(struct rt2x00_dev *rt2x00dev)
1196 return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC);
1202 rt2x00_has_cap_flag(struct rt2x00_dev *rt2x00dev,
1205 return test_bit(cap_flag, &rt2x00dev->cap_flags);
1209 rt2x00_has_cap_hw_crypto(struct rt2x00_dev *rt2x00dev)
1211 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_HW_CRYPTO);
1215 rt2x00_has_cap_power_limit(struct rt2x00_dev *rt2x00dev)
1217 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_POWER_LIMIT);
1221 rt2x00_has_cap_control_filters(struct rt2x00_dev *rt2x00dev)
1223 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_CONTROL_FILTERS);
1227 rt2x00_has_cap_control_filter_pspoll(struct rt2x00_dev *rt2x00dev)
1229 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_CONTROL_FILTER_PSPOLL);
1233 rt2x00_has_cap_pre_tbtt_interrupt(struct rt2x00_dev *rt2x00dev)
1235 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_PRE_TBTT_INTERRUPT);
1239 rt2x00_has_cap_link_tuning(struct rt2x00_dev *rt2x00dev)
1241 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_LINK_TUNING);
1245 rt2x00_has_cap_frame_type(struct rt2x00_dev *rt2x00dev)
1247 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_FRAME_TYPE);
1251 rt2x00_has_cap_rf_sequence(struct rt2x00_dev *rt2x00dev)
1253 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_RF_SEQUENCE);
1257 rt2x00_has_cap_external_lna_a(struct rt2x00_dev *rt2x00dev)
1259 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_LNA_A);
1263 rt2x00_has_cap_external_lna_bg(struct rt2x00_dev *rt2x00dev)
1265 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_LNA_BG);
1269 rt2x00_has_cap_external_pa(struct rt2x00_dev *rt2x00dev)
1271 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_EXTERNAL_PA_TX0);
1275 rt2x00_has_cap_double_antenna(struct rt2x00_dev *rt2x00dev)
1277 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_DOUBLE_ANTENNA);
1281 rt2x00_has_cap_bt_coexist(struct rt2x00_dev *rt2x00dev)
1283 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_BT_COEXIST);
1287 rt2x00_has_cap_vco_recalibration(struct rt2x00_dev *rt2x00dev)
1289 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_VCO_RECALIBRATION);
1293 rt2x00_has_cap_restart_hw(struct rt2x00_dev *rt2x00dev)
1295 return rt2x00_has_cap_flag(rt2x00dev, CAPABILITY_RESTART_HW);
1314 * @rt2x00dev: Pointer to &struct rt2x00_dev.
1320 rt2x00queue_get_tx_queue(struct rt2x00_dev *rt2x00dev,
1323 if (queue >= rt2x00dev->ops->tx_queues && queue < IEEE80211_NUM_ACS)
1324 queue = rt2x00dev->ops->tx_queues - 1;
1326 if (queue < rt2x00dev->ops->tx_queues && rt2x00dev->tx)
1327 return &rt2x00dev->tx[queue];
1330 return rt2x00dev->atim;
1390 * @rt2x00dev: Pointer to &struct rt2x00_dev.
1394 void rt2x00queue_start_queues(struct rt2x00_dev *rt2x00dev);
1398 * @rt2x00dev: Pointer to &struct rt2x00_dev.
1403 void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev);
1407 * @rt2x00dev: Pointer to &struct rt2x00_dev.
1413 void rt2x00queue_flush_queues(struct rt2x00_dev *rt2x00dev, bool drop);
1420 * @rt2x00dev: Pointer to &struct rt2x00_dev.
1425 void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
1428 static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
1438 u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
1440 void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr);
1445 void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev);
1446 void rt2x00lib_pretbtt(struct rt2x00_dev *rt2x00dev);
1511 int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev);
1512 void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev);
1514 int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev);
1515 int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev);