#include "testmode.h"
static unsigned int ath6kl_p2p;
+static unsigned int multi_norm_if_support;
module_param(ath6kl_p2p, uint, 0644);
+module_param(multi_norm_if_support, uint, 0644);
#define RATETAB_ENT(_rate, _rateid, _flags) { \
.bitrate = (_rate), \
}
}
+ if (type == NL80211_IFTYPE_P2P_CLIENT ||
+ type == NL80211_IFTYPE_P2P_GO) {
+ for (i = ar->max_norm_iface; i < MAX_NUM_VIF; i++) {
+ if ((ar->avail_idx_map >> i) & BIT(0)) {
+ *if_idx = i;
+ return true;
+ }
+ }
+ }
+
return false;
}
}
ar = wiphy_priv(wiphy);
- ar->p2p = !!ath6kl_p2p;
+ if (!multi_norm_if_support)
+ ar->p2p = !!ath6kl_p2p;
ar->wiphy = wiphy;
ar->dev = dev;
+ if (multi_norm_if_support)
+ ar->max_norm_iface = 2;
+ else
+ ar->max_norm_iface = 1;
+
+ /* FIXME: Remove this once the multivif support is enabled */
+ ar->max_norm_iface = 1;
+
spin_lock_init(&ar->lock);
spin_lock_init(&ar->mcastpsq_lock);
spin_lock_init(&ar->list_lock);
int ath6kl_configure_target(struct ath6kl *ar)
{
u32 param, ram_reserved_size;
- u8 fw_iftype, fw_mode = 0, fw_submode;
+ u8 fw_iftype, fw_mode = 0, fw_submode = 0;
int i;
/*
fw_mode |= fw_iftype << (i * HI_OPTION_FW_MODE_BITS);
/*
- * submodes : vif[0] - AP/STA/IBSS
- * vif[1] - "P2P dev"/"P2P GO"/"P2P Client"
- * vif[2] - "P2P dev"/"P2P GO"/"P2P Client"
+ * By default, submodes :
+ * vif[0] - AP/STA/IBSS
+ * vif[1] - "P2P dev"/"P2P GO"/"P2P Client"
+ * vif[2] - "P2P dev"/"P2P GO"/"P2P Client"
*/
- fw_submode = HI_OPTION_FW_SUBMODE_NONE |
- (HI_OPTION_FW_SUBMODE_P2PDEV <<
- (1 * HI_OPTION_FW_SUBMODE_BITS)) |
- (HI_OPTION_FW_SUBMODE_P2PDEV <<
- (2 * HI_OPTION_FW_SUBMODE_BITS));
+
+ for (i = 0; i < ar->max_norm_iface; i++)
+ fw_submode |= HI_OPTION_FW_SUBMODE_NONE <<
+ (i * HI_OPTION_FW_SUBMODE_BITS);
+
+ for (i = ar->max_norm_iface; i < MAX_NUM_VIF; i++)
+ fw_submode |= HI_OPTION_FW_SUBMODE_P2PDEV <<
+ (i * HI_OPTION_FW_SUBMODE_BITS);
/*
* FIXME: This needs to be removed once the multivif
*/
if (ar->p2p)
fw_submode = HI_OPTION_FW_SUBMODE_P2PDEV;
- else
- fw_submode = HI_OPTION_FW_SUBMODE_NONE;
param = HTC_PROTOCOL_VERSION;
if (ath6kl_bmi_write(ar,