various fixes
authornotaz <notasas@gmail.com>
Mon, 9 Feb 2015 00:10:52 +0000 (02:10 +0200)
committernotaz <notasas@gmail.com>
Mon, 9 Feb 2015 01:58:30 +0000 (03:58 +0200)
sta_dk/common/src/utils/memMngrEx.c
sta_dk/pform/linux/src/ioctl_list.c
sta_dk/pform/linux/src/osmemapi.c

index fef335a..f117d00 100644 (file)
@@ -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;
 
index d668ab6..ea7dad8 100644 (file)
@@ -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" : "",
index 0c8dc63..65e47d0 100644 (file)
@@ -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;