lede/package/network/utils/wireless-tools/patches/005-fix-iwpriv-e2p-error.patch
2023-03-02 15:19:27 +08:00

24 lines
705 B
Diff
Executable File

--- a/iwpriv.c
+++ b/iwpriv.c
@@ -259,7 +259,7 @@
int priv_num) /* Number of descriptions */
{
struct iwreq wrq;
- u_char buffer[4096]; /* Only that big in v25 and later */
+ u_char buffer[8192*2]; /* this buffer size for get_site_survey length */
int i = 0; /* Start with first command arg */
int k; /* Index in private description table */
int temp;
@@ -425,6 +425,11 @@
else
{
wrq.u.data.length = 0L;
+ if(0 == strcmp("get_site_survey", cmdname))
+ {
+ wrq.u.data.length = 120*128; // 120 is per entry size, 128 is counter of entry
+ fprintf(stderr, "(%d)cmdname %s\n",cmdname);
+ }
}
strncpy(wrq.ifr_name, ifname, IFNAMSIZ);