Skip to content

Commit

Permalink
Merge pull request #70 from vk496/master
Browse files Browse the repository at this point in the history
Ralink -01
  • Loading branch information
soxrok2212 committed Aug 7, 2016
2 parents 239276d + 551583f commit f512371
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/80211.c
Expand Up @@ -32,6 +32,7 @@
*/

#include "80211.h"
#include "common/defs.h"

/*Reads the next packet from pcap_next() and validates the FCS. */
const u_char *next_packet(struct pcap_pkthdr *header)
Expand Down Expand Up @@ -172,16 +173,20 @@ int8_t signal_strength(const u_char *packet, size_t len)
if((header->flags & FHSS_FLAG) == FHSS_FLAG)
{
offset += FHSS_FLAG;
} else {
}

int ath9k = 0;
if (packet[offset] == 0) { //no data. ath9k
offset += 12;
ath9k = 1;
}

if(offset < len)
{
ssi = (int8_t) packet[offset];
}

if (ssi > 100) {
if (ath9k == 1) {
ssi = 100 - ssi;
}
}
Expand Down

0 comments on commit f512371

Please sign in to comment.