/** * enum b43_txpwr_result - Return value for the recalc_txpower PHY op. * * @B43_TXPWR_RES_NEED_ADJUST: Values changed. Hardware adjustment is needed. * @B43_TXPWR_RES_DONE: No more work to do. Everything is done.
*/ enum b43_txpwr_result {
B43_TXPWR_RES_NEED_ADJUST,
B43_TXPWR_RES_DONE,
};
/** * struct b43_phy_operations - Function pointers for PHY ops. * * @allocate: Allocate and initialise the PHY data structures. * Must not be NULL. * @free: Destroy and free the PHY data structures. * Must not be NULL. * * @prepare_structs: Prepare the PHY data structures. * The data structures allocated in @allocate are * initialized here. * Must not be NULL. * @prepare_hardware: Prepare the PHY. This is called before b43_chip_init to * do some early PHY hardware init. * Can be NULL, if not required. * @init: Initialize the PHY. * Must not be NULL. * @exit: Shutdown the PHY. * Can be NULL, if not required. * * @phy_read: Read from a PHY register. * Must not be NULL. * @phy_write: Write to a PHY register. * Must not be NULL. * @phy_maskset: Maskset a PHY register, taking shortcuts. * If it is NULL, a generic algorithm is used. * @radio_read: Read from a Radio register. * Must not be NULL. * @radio_write: Write to a Radio register. * Must not be NULL. * * @supports_hwpctl: Returns a boolean whether Hardware Power Control * is supported or not. * If NULL, hwpctl is assumed to be never supported. * @software_rfkill: Turn the radio ON or OFF. * Possible state values are * RFKILL_STATE_SOFT_BLOCKED or * RFKILL_STATE_UNBLOCKED * Must not be NULL. * @switch_analog: Turn the Analog on/off. * Must not be NULL. * @switch_channel: Switch the radio to another channel. * Must not be NULL. * @get_default_chan: Just returns the default channel number. * Must not be NULL. * @set_rx_antenna: Set the antenna used for RX. * Can be NULL, if not supported. * @interf_mitigation: Switch the Interference Mitigation mode. * Can be NULL, if not supported. * * @recalc_txpower: Recalculate the transmission power parameters. * This callback has to recalculate the TX power settings, * but does not need to write them to the hardware, yet. * Returns enum b43_txpwr_result to indicate whether the hardware * needs to be adjusted. * If B43_TXPWR_NEED_ADJUST is returned, @adjust_txpower * will be called later. * If the parameter "ignore_tssi" is true, the TSSI values should * be ignored and a recalculation of the power settings should be * done even if the TSSI values did not change. * This function may sleep, but should not. * Must not be NULL. * @adjust_txpower: Write the previously calculated TX power settings * (from @recalc_txpower) to the hardware. * This function may sleep. * Can be NULL, if (and ONLY if) @recalc_txpower _always_ * returns B43_TXPWR_RES_DONE. * * @pwork_15sec: Periodic work. Called every 15 seconds. * Can be NULL, if not required. * @pwork_60sec: Periodic work. Called every 60 seconds. * Can be NULL, if not required.
*/ struct b43_phy_operations { /* Initialisation */ int (*allocate)(struct b43_wldev *dev); void (*free)(struct b43_wldev *dev); void (*prepare_structs)(struct b43_wldev *dev); int (*prepare_hardware)(struct b43_wldev *dev); int (*init)(struct b43_wldev *dev); void (*exit)(struct b43_wldev *dev);
/* Most hardware context information is stored in the standard- * specific data structures pointed to by the pointers below.
* Only one of them is valid (the currently enabled PHY). */ #ifdef CONFIG_B43_DEBUG /* No union for debug build to force NULL derefs in buggy code. */ struct { #else union { #endif /* G-PHY specific information */ struct b43_phy_g *g; /* N-PHY specific information */ struct b43_phy_n *n; /* LP-PHY specific information */ struct b43_phy_lp *lp; /* HT-PHY specific information */ struct b43_phy_ht *ht; /* LCN-PHY specific information */ struct b43_phy_lcn *lcn; /* AC-PHY specific information */ struct b43_phy_ac *ac;
};
/* Band support flags. */ bool supports_2ghz; bool supports_5ghz;
/* Is GMODE (2 GHz mode) bit enabled? */ bool gmode;
/* After power reset full init has to be performed */ bool do_full_init;
/* Analog Type */
u8 analog; /* B43_PHYTYPE_ */
u8 type; /* PHY revision number. */
u8 rev;
/* Count writes since last read */
u8 writes_counter;
/* Radio versioning */
u16 radio_manuf; /* Radio manufacturer */
u16 radio_ver; /* Radio version */
u8 radio_rev; /* Radio revision */
/* Software state of the radio */ bool radio_on;
/* Desired TX power level (in dBm).
* This is set by the user and adjusted in b43_phy_xmitpower(). */ int desired_txpower;
/* Hardware Power Control enabled? */ bool hardware_power_control;
/* The time (in absolute jiffies) when the next TX power output
* check is needed. */ unsignedlong next_txpwr_check_time;
/* Current channel */ struct cfg80211_chan_def *chandef; unsignedint channel;
/** * b43_phy_allocate - Allocate PHY structs * Allocate the PHY data structures, based on the current dev->phy.type
*/ int b43_phy_allocate(struct b43_wldev *dev);
/** * b43_has_hardware_pctl - Hardware Power Control supported? * Returns a boolean, whether hardware power control is supported.
*/ bool b43_has_hardware_pctl(struct b43_wldev *dev);
/** * b43_phy_copy - copy contents of 16bit PHY register to another
*/ void b43_phy_copy(struct b43_wldev *dev, u16 destreg, u16 srcreg);
/** * b43_phy_mask - Mask a PHY register with a mask
*/ void b43_phy_mask(struct b43_wldev *dev, u16 offset, u16 mask);
/** * b43_phy_set - OR a PHY register with a bitmap
*/ void b43_phy_set(struct b43_wldev *dev, u16 offset, u16 set);
/** * b43_phy_maskset - Mask and OR a PHY register with a mask and bitmap
*/ void b43_phy_maskset(struct b43_wldev *dev, u16 offset, u16 mask, u16 set);
/** * b43_radio_mask - Mask a 16bit radio register with a mask
*/ void b43_radio_mask(struct b43_wldev *dev, u16 offset, u16 mask);
/** * b43_radio_set - OR a 16bit radio register with a bitmap
*/ void b43_radio_set(struct b43_wldev *dev, u16 offset, u16 set);
/** * b43_radio_maskset - Mask and OR a radio register with a mask and bitmap
*/ void b43_radio_maskset(struct b43_wldev *dev, u16 offset, u16 mask, u16 set);
/** * b43_radio_wait_value - Waits for a given value in masked register read
*/ bool b43_radio_wait_value(struct b43_wldev *dev, u16 offset, u16 mask,
u16 value, int delay, int timeout);
/** * b43_switch_channel - Switch to another channel
*/ int b43_switch_channel(struct b43_wldev *dev, unsignedint new_channel);
/** * b43_software_rfkill - Turn the radio ON or OFF in software.
*/ void b43_software_rfkill(struct b43_wldev *dev, bool blocked);
/** * b43_phy_txpower_check - Check TX power output. * * Compare the current TX power output to the desired power emission * and schedule an adjustment in case it mismatches. * * @flags: OR'ed enum b43_phy_txpower_check_flags flags. * See the docs below.
*/ void b43_phy_txpower_check(struct b43_wldev *dev, unsignedint flags); /** * enum b43_phy_txpower_check_flags - Flags for b43_phy_txpower_check() * * @B43_TXPWR_IGNORE_TIME: Ignore the schedule time and force-redo * the check now. * @B43_TXPWR_IGNORE_TSSI: Redo the recalculation, even if the average * TSSI did not change.
*/ enum b43_phy_txpower_check_flags {
B43_TXPWR_IGNORE_TIME = (1 << 0),
B43_TXPWR_IGNORE_TSSI = (1 << 1),
};
/** * b43_phy_shm_tssi_read - Read the average of the last 4 TSSI from SHM. * * @shm_offset: The SHM address to read the values from. * * Returns the average of the 4 TSSI values, or a negative error code.
*/ int b43_phy_shm_tssi_read(struct b43_wldev *dev, u16 shm_offset);
/** * b43_phy_switch_analog_generic - Generic PHY operation for switching the Analog. * * It does the switching based on the PHY0 core register. * Do _not_ call this directly. Only use it as a switch_analog callback * for struct b43_phy_operations.
*/ void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.