Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ralink -01 #70

Merged
merged 2 commits into from Aug 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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