float2reate introduced.
FossilOrigin-Name: 7e122c31ac685504c3a2324d30d4fa3c72d6505cfc93e705ed3703d78589a524
This commit is contained in:
parent
671d190c94
commit
17f49232c8
@ -238,15 +238,17 @@ static inline int dot11_put_ssid(uint8_t *dst,uint8_t * ssid,int len){
|
||||
|
||||
}
|
||||
|
||||
#define dot11_rate(rate) ((int)(rate*2+0.5));
|
||||
#define dot11_float2rate(frate) ((int)(frate*2+0.5));
|
||||
#define dot11 rate2float(rate) ((float)(rate)/2.0)
|
||||
|
||||
static inline int dot11_put_supported_rates(uint8_t *dst, float *basic, float *rates){
|
||||
uint8_t *d = dst+2;
|
||||
while(*basic != 0.0){
|
||||
*d++ = 0x80 | dot11_rate(*basic);
|
||||
*d++ = 0x80 | dot11_float2rate(*basic);
|
||||
basic++;
|
||||
}
|
||||
while(*rates != 0.0){
|
||||
*d++ = dot11_rate(*rates);
|
||||
*d++ = dot11_float2rate(*rates);
|
||||
rates++;
|
||||
}
|
||||
*(dst)=DOT11_ELEM_SUPPORTED_RATES;
|
||||
|
Loading…
Reference in New Issue
Block a user