2 *************************************************************************
4 * 5F., No.36, Taiyuan St., Jhubei City,
8 * (c) Copyright 2002-2007, Ralink Technology, Inc.
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
25 *************************************************************************
34 --------- ---------- ----------------------------------------------
37 #include "rt_config.h"
40 NDIS_STATUS RTMPReadParametersHook(
45 RTMP_OS_FS_INFO osFSInfo;
46 INT retval = NDIS_STATUS_FAILURE;
49 buffer = kmalloc(MAX_INI_BUFFER_SIZE, MEM_ALLOC_FLAG);
51 return NDIS_STATUS_FAILURE;
52 memset(buffer, 0x00, MAX_INI_BUFFER_SIZE);
56 src = STA_PROFILE_PATH;
62 RtmpOSFSInfoChange(&osFSInfo, TRUE);
63 srcf = RtmpOSFileOpen(src, O_RDONLY, 0);
64 if (IS_FILE_OPEN_ERR(srcf))
66 DBGPRINT(RT_DEBUG_ERROR, ("Open file \"%s\" failed!\n", src));
70 retval =RtmpOSFileRead(srcf, buffer, MAX_INI_BUFFER_SIZE);
73 RTMPSetProfileParameters(pAd, buffer);
74 retval = NDIS_STATUS_SUCCESS;
77 DBGPRINT(RT_DEBUG_ERROR, ("Read file \"%s\" failed(errCode=%d)!\n", src, retval));
79 retval = RtmpOSFileClose(srcf);
82 retval = NDIS_STATUS_FAILURE;
83 DBGPRINT(RT_DEBUG_ERROR, ("Close file \"%s\" failed(errCode=%d)!\n", src, retval));
87 RtmpOSFSInfoChange(&osFSInfo, FALSE);