Skip to content

Commit

Permalink
Update ioctl_linux.c
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Dec 22, 2023
1 parent c3301b5 commit 3b4eaa3
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions os_dep/linux/ioctl_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -3256,18 +3256,22 @@ if (extra) {
wrqu->data.length = 23;
wrqu->data.flags = 1;

time_t t;
struct tm* tm_info;
// Compile-time date and time strings
const char* compile_date = __DATE__;
const char* compile_time = __TIME__;

time(&t);
tm_info = localtime(&t);
// Extract day, month, and year from the compile_date string
int compile_day, compile_month, compile_year;
sscanf(compile_date, "%s %d %d", NULL, &compile_month, &compile_day, &compile_year);

// Format the current date as ddmmyy
// Format the compile date as ddmmyy
char date_str[7];
sprintf(date_str, "%02d%02d%02d", tm_info->tm_mday, tm_info->tm_mon + 1, tm_info->tm_year % 100);
sprintf(date_str, "%02d%02d%02d", compile_day, compile_month, compile_year % 100);

_rtw_memcpy(extra, "rtl8812au_openhd_", 17);
_rtw_memcpy(extra + 17, date_str, 6);
printf("date_str: %s\n", date_str);

_rtw_memcpy(extra, "rtl8812au_openhd_", 17);
_rtw_memcpy(extra + 17, date_str, 6);
}

/* rtw_signal_process(pid, SIGUSR1); */ /* for test */
Expand Down

0 comments on commit 3b4eaa3

Please sign in to comment.