From: notaz Date: Mon, 9 Feb 2015 00:10:52 +0000 (+0200) Subject: various fixes X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30cd390a9d0e3e13228f7b4f03e11d2a3d70a354;p=pandora-wifi.git various fixes --- diff --git a/sta_dk/common/src/utils/memMngrEx.c b/sta_dk/common/src/utils/memMngrEx.c index fef335a..f117d00 100644 --- a/sta_dk/common/src/utils/memMngrEx.c +++ b/sta_dk/common/src/utils/memMngrEx.c @@ -1353,7 +1353,7 @@ void memMngrPrint(TI_HANDLE hMemMngr) void print_MsduDataHeader(TI_HANDLE hMemMngr, mem_MSDU_T *pMsdu) { mem_BD_T *pBd; - UINT8 tempBuffer[40],*pTempBuffer; + UINT8 tempBuffer[60],*pTempBuffer; UINT32 lengthToPrint = 40; UINT32 i; diff --git a/sta_dk/pform/linux/src/ioctl_list.c b/sta_dk/pform/linux/src/ioctl_list.c index d668ab6..ea7dad8 100644 --- a/sta_dk/pform/linux/src/ioctl_list.c +++ b/sta_dk/pform/linux/src/ioctl_list.c @@ -140,6 +140,11 @@ int ti1610_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) int res, aval_data_size = ((char *) req + sizeof(*req)) - (char *)&req->user_data_pointer; /* = ~4 bytes */ /*int is_get_cmd = (req->cmd_type & IOCTL_GET);*/ + if ((req->cmd >> 16) != FILE_DEVICE_UNKNOWN) { + printk(KERN_ERR "rejecting ioctl %08x\n", (int)req->cmd); + return -EINVAL; + } + print_deb("ti1610_do_ioctl(cmd=%lu(%s%s)) - user_data_pointer=0x%lx, len = %lu, aval_data_size=%d\n", req->cmd, (req->cmd_type & IOCTL_GET) ? "GET" : "", (req->cmd_type & IOCTL_SET) ? "SET" : "", diff --git a/sta_dk/pform/linux/src/osmemapi.c b/sta_dk/pform/linux/src/osmemapi.c index 0c8dc63..65e47d0 100644 --- a/sta_dk/pform/linux/src/osmemapi.c +++ b/sta_dk/pform/linux/src/osmemapi.c @@ -105,9 +105,11 @@ os_memoryAlloc( otherwise allocate from virtual pool. */ /* 2 pages */ - if (Size < 2 * 4096) + //if (Size < 2 * 4096) + if (1) { - blk = kmalloc(total_size, GFP_ATOMIC); + blk = kzalloc(total_size, GFP_KERNEL); + //blk = kmalloc(total_size, GFP_ATOMIC); if (!blk) return NULL; blk->f_free = (os_free)kfree;