void s3c_bat_use_wimax(int onoff) { struct file *fp; fp = klib_fopen(WIMAX_BAT_SYSPATH, O_RDWR, 0); if (!fp) pr_err("open fail"); if (onoff) klib_fwrite("1", 1, fp); else klib_fwrite("0", 1, fp); klib_fclose(fp); }
void cmc7xx_tune_cpu(struct net_adapter *adapter, int onoff) { struct file *fp2; fp2 = klib_fopen(WIMAX_CPU0SCALING_PATH, O_RDWR, 0); if (!fp2) { dump_debug("open fail"); return; } if ((!onoff) && (adapter->cputunedone)) { adapter->cputunedone = false; klib_fwrite((char *)&adapter->cpu0scaling, strlen(adapter->cpu0scaling), fp2); } else if ((onoff) && (!adapter->cputunedone)) { adapter->cputunedone = true; klib_fread((char *)&adapter->cpu0scaling, sizeof(adapter->cpu0scaling), fp2); klib_fwrite("performance", strlen("performance"), fp2); } klib_fclose(fp2); }