Skip to content

Commit ab466ff

Browse files
abdelali221DacoTaco
authored andcommitted
Get the thing to compile correctly.
1 parent f5b4f2a commit ab466ff

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

gc/ogc/wd.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ typedef struct IE_hdr
163163

164164
// Security :
165165

166-
#define WPA_ESSENTIALS 4
167-
#define RSN_ESSENTIALS 0
166+
#define WPA_OFFSET 4
167+
#define RSN_OFFSET 0
168168

169169
enum WD_SECURITY
170170
{
@@ -217,10 +217,8 @@ int WD_GetVendorSpecificIE(BSSDescriptor* Bss, u32 OUI, u8* buff, u8 buffsize);
217217

218218
// AP Security related :
219219

220-
int WD_GetRSNEssentials(BSSDescriptor *Bss, IE_RSN *IE);
221-
int WD_GetRSNPCSList(BSSDescriptor *Bss, u8* buff, u8 buffsize);
222-
int WD_GetWPAIEEssentials(BSSDescriptor *Bss, IE_WPA *IE);
223-
int WD_GetWPA_PCSList(BSSDescriptor *Bss, u8* destbuff, u16 buffsize);
220+
int WD_GetPCSList(BSSDescriptor *Bss, u8* buff, u8 buffsize, u8 offset);
221+
int WD_GetRSN_WPAEssentials(BSSDescriptor *Bss, IE_RSN_WPA *IE, u8 offset);
224222
u8 WD_GetSecurity(BSSDescriptor *Bss);
225223

226224
#endif

libogc/wd.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ int WD_GetVendorSpecificIELength(BSSDescriptor* Bss, u32 OUI) {
322322
return hdr->len;
323323
}
324324

325-
int WD_GetPCSList(BSSDescriptor *Bss, u8* destbuff, u16 buffsize, u8 offset) {
325+
int WD_GetPCSList(BSSDescriptor *Bss, u8* destbuff, u8 buffsize, u8 offset) {
326326
if(!Bss) return WD_INVALIDBUFF;
327327
if(!destbuff) return WD_INVALIDBUFF;
328328

@@ -376,10 +376,10 @@ u8 WD_GetSecurity(BSSDescriptor *Bss) {
376376

377377
if (ie_len != WD_NOTFOUND && ie_len > 0) { // WPA
378378
IE_RSN_WPA IE;
379-
WD_GetRSN_WPAEssentials(Bss, &IE, WPA_ESSENTIALS);
379+
WD_GetRSN_WPAEssentials(Bss, &IE, WPA_OFFSET);
380380

381381
u8 buff[IE.PCS_Count * 4];
382-
WD_GetWPA_PCSList(Bss, buff, IE.PCS_Count * 4);
382+
WD_GetPCSList(Bss, buff, IE.PCS_Count * 4, WPA_OFFSET);
383383

384384
u8 offset = 0;
385385

@@ -395,10 +395,10 @@ u8 WD_GetSecurity(BSSDescriptor *Bss) {
395395

396396
if(ie_len != WD_NOTFOUND && ie_len > 0) { // WPA2
397397
IE_RSN_WPA IE;
398-
WD_GetRSN_WPAEssentials(Bss, &IE);
398+
WD_GetRSN_WPAEssentials(Bss, &IE, RSN_OFFSET);
399399

400400
u8 buff[IE.PCS_Count * 4];
401-
WD_GetRSN_PCSList(Bss, buff, IE.PCS_Count * 4);
401+
WD_GetPCSList(Bss, buff, IE.PCS_Count * 4, RSN_OFFSET);
402402

403403
u8 offset = 0;
404404

0 commit comments

Comments
 (0)