22 #include <asm/uaccess.h>
80 unifi_error(priv,
"downloading firmware... unknown request: %d\n", is_fw);
107 struct dlpriv *dl_struct = (
struct dlpriv *)dlpriv;
110 if (dl_struct !=
NULL) {
204 if (offset >= dlpriv->
dl_len) {
209 if ((offset + len) > dlpriv->
dl_len) {
223 #define UNIFIHELPER_INIT_MODE_SMEUSER 2
224 #define UNIFIHELPER_INIT_MODE_NATIVE 1
245 #ifdef CONFIG_HOTPLUG
248 char *
prog =
"/system/bin/unififw";
250 char *prog =
"/usr/sbin/unififw";
253 char *argv[6], *envp[4];
258 #if (defined CSR_SME_USERSPACE) && (!defined CSR_SUPPORT_WEXT)
259 unifi_trace(priv,
UDBG1,
"SME userspace build: run unifi_helper manually\n");
266 #if (defined CSR_SME_USERSPACE)
274 argv[i++] = inst_str;
275 argv[i++] = init_mode;
282 envp[i++] =
"HOME=/";
283 envp[i++] =
"PATH=/sbin:/bin:/usr/sbin:/usr/bin";
293 unifi_trace(priv,
UDBG1,
"Can't automatically download firmware because kernel does not have HOTPLUG\n");
298 #ifdef CSR_WIFI_SPLIT_PATCH
330 #define UNIFI_MAX_FW_PATH_LEN 32
334 #if (defined CSR_SUPPORT_SME) && (defined CSR_SUPPORT_WEXT)
335 if (priv->mib_data.length) {
336 vfree(priv->mib_data.data);
337 priv->mib_data.data =
NULL;
338 priv->mib_data.length = 0;
347 #ifdef CSR_WIFI_SPLIT_PATCH
349 postfix, (is_ap_mode(priv) ?
"ap.xbv" :
"staonly.xbv") );
352 postfix,
"sta.xbv" );
358 priv->
fw_sta.fw_desc = (
void *)fw_entry;
404 if (to_free !=
NULL) {