Skip to content

Commit

Permalink
- Fix detecting ENC28J60 after reload.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Jun 13, 2024
1 parent aeb0ef8 commit 4f5570d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cube/swiss/source/bba.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ static void *net_thread_func(void *arg)
return NULL;
}

net_initialized = 1;
strcpy(swissSettings.bbaLocalIp, inet_ntoa(bba_localip));
swissSettings.bbaNetmask = (32 - __builtin_ctz(bba_netmask.s_addr));
strcpy(swissSettings.bbaGateway, inet_ntoa(bba_gateway));
Expand Down Expand Up @@ -61,7 +62,6 @@ static void *net_thread_func(void *arg)
deviceHandler_setDeviceAvailable(&__device_ftp, deviceHandler_FTP_test());
deviceHandler_setDeviceAvailable(&__device_fsp, deviceHandler_FSP_test());

net_initialized = 1;
init_httpd_thread();
init_wiiload_thread();
return NULL;
Expand Down Expand Up @@ -96,6 +96,9 @@ u32 bba_exists(u32 location)
{
u32 id;

if (location & bba_location)
return bba_location;

if ((location & LOC_SERIAL_PORT_1) && EXI_GetID(EXI_CHANNEL_0, EXI_DEVICE_2, &id)) {
switch (id) {
case EXI_MX98730EC_ID:
Expand Down
2 changes: 1 addition & 1 deletion cube/swiss/source/gui/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const char* getDeviceInfoString(u32 location) {
else if(device == &__device_wkf) {
sprintf(topStr, "%s (%s)", device->hwName, wkfGetSerial());
}
else if(location == bba_location || (bba_location == LOC_UNK && bba_exists(LOC_ANY) == location)) {
else if(location == bba_exists(LOC_ANY)) {
sprintf(topStr, "%s (%s)", getHwNameByLocation(location), bba_address_str());
}
else {
Expand Down

0 comments on commit 4f5570d

Please sign in to comment.