The IEEE Std 802.11-2012 says in Table 20-1:
RSSI - The allowed values for the RSSI parameter are in the range from 0 to RSSI
maximum. This parameter is a measure by the PHY of the power observed
at the antennas used to receive the current PPDU. RSSI shall be measured
during the reception of the PLCP preamble. In HT-mixed format, the
reported RSSI shall be measured during the reception of the HT-LTFs.
RSSI is intended to be used in a relative manner, and it shall be a
monotonically increasing function of the received power.
While is is not required to have a precise relationship between physical measurements and RSSI magnitudes, my experience from experiments is that there is often a strong correlation between received power (dBm) and the RSSI. The manufacturers take care of the implementation details, they probably factor out details like amplifier gains. However some receivers just measure in-band power, so good RSSI does not imply a good signal-to-noise ratio.
RSSI is used for example for clear channel assessment (CCA) or the signal quality indicator you see in your OS, as mandated by IEEE 802.11. The manufacturers implement RSSI to be fit for these purposes, it should not be confused with a precise measurement. This indicator was never intended for such a purpose.