diff --git a/core/mesh/rtw_mesh.c b/core/mesh/rtw_mesh.c index 79c7958..3a252ec 100644 --- a/core/mesh/rtw_mesh.c +++ b/core/mesh/rtw_mesh.c @@ -3035,7 +3035,7 @@ void rtw_mesh_cfg_init(_adapter *adapter) mcfg->dot11MeshHWMPpreqMinInterval = RTW_MESH_PREQ_MIN_INT; mcfg->dot11MeshHWMPperrMinInterval = RTW_MESH_PERR_MIN_INT; mcfg->dot11MeshHWMPnetDiameterTraversalTime = RTW_MESH_DIAM_TRAVERSAL_TIME; - mcfg->dot11MeshHWMPRootMode = RTW_IEEE80211_ROOTMODE_NO_ROOT; + mcfg->dot11MeshHWMPRootMode = IEEE80211_ROOTMODE_NO_ROOT; mcfg->dot11MeshHWMPRannInterval = RTW_MESH_RANN_INTERVAL; mcfg->dot11MeshGateAnnouncementProtocol = _FALSE; mcfg->dot11MeshForwarding = _TRUE; diff --git a/core/mesh/rtw_mesh_hwmp.c b/core/mesh/rtw_mesh_hwmp.c index 42b1a29..2d39e25 100644 --- a/core/mesh/rtw_mesh_hwmp.c +++ b/core/mesh/rtw_mesh_hwmp.c @@ -1519,15 +1519,15 @@ void rtw_mesh_path_tx_root_frame(_adapter *adapter) ? RTW_RANN_FLAG_IS_GATE : 0; switch (mshcfg->dot11MeshHWMPRootMode) { - case RTW_IEEE80211_PROACTIVE_RANN: + case IEEE80211_PROACTIVE_RANN: rtw_mesh_path_sel_frame_tx(RTW_MPATH_RANN, flags, adapter_mac_addr(adapter), ++minfo->sn, 0, NULL, 0, bcast_addr, 0, mshcfg->element_ttl, interval, 0, 0, adapter); break; - case RTW_IEEE80211_PROACTIVE_PREQ_WITH_PREP: + case IEEE80211_PROACTIVE_PREQ_WITH_PREP: flags |= RTW_IEEE80211_PREQ_PROACTIVE_PREP_FLAG; - case RTW_IEEE80211_PROACTIVE_PREQ_NO_PREP: + case IEEE80211_PROACTIVE_PREQ_NO_PREP: interval = mshcfg->dot11MeshHWMPactivePathToRootTimeout; target_flags |= RTW_IEEE80211_PREQ_TO_FLAG | RTW_IEEE80211_PREQ_USN_FLAG; @@ -1570,7 +1570,7 @@ static void rtw_ieee80211_mesh_rootpath(_adapter *adapter) rtw_mesh_path_tx_root_frame(adapter); - if (adapter->mesh_cfg.dot11MeshHWMPRootMode == RTW_IEEE80211_PROACTIVE_RANN) + if (adapter->mesh_cfg.dot11MeshHWMPRootMode == IEEE80211_PROACTIVE_RANN) interval = adapter->mesh_cfg.dot11MeshHWMPRannInterval; else interval = adapter->mesh_cfg.dot11MeshHWMProotInterval; @@ -1583,7 +1583,7 @@ BOOLEAN rtw_ieee80211_mesh_root_setup(_adapter *adapter) { BOOLEAN root_enabled = _FALSE; - if (adapter->mesh_cfg.dot11MeshHWMPRootMode > RTW_IEEE80211_ROOTMODE_ROOT) { + if (adapter->mesh_cfg.dot11MeshHWMPRootMode > IEEE80211_ROOTMODE_ROOT) { rtw_set_bit(RTW_MESH_WORK_ROOT, &adapter->wrkq_flags); root_enabled = _TRUE; } diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 7358168..2f769e2 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -14397,7 +14397,7 @@ static int rtw_scan_ch_decision(_adapter *padapter, struct rtw_ieee80211_channel if (0) RTW_INFO(FUNC_ADPT_FMT" "CHAN_FMT"\n", FUNC_ADPT_ARG(padapter), CHAN_ARG(&in[i])); - if (!in[i].hw_value || (in[i].flags & RTW_IEEE80211_CHAN_DISABLED)) + if (!in[i].hw_value || (in[i].flags & IEEE80211_CHAN_DISABLED)) continue; if (rtw_mlme_band_check(padapter, in[i].hw_value) == _FALSE) continue; diff --git a/include/ieee80211.h b/include/ieee80211.h index 631c785..c7fbc09 100644 --- a/include/ieee80211.h +++ b/include/ieee80211.h @@ -1592,55 +1592,10 @@ enum rtw_ieee80211_preq_target_flags { RTW_IEEE80211_PREQ_USN_FLAG = 1<<2, }; -/** - * enum rtw_ieee80211_root_mode_identifier - root mesh STA mode identifier - * - * These attribute are used by dot11MeshHWMPRootMode to set root mesh STA mode - * - * @RTW_IEEE80211_ROOTMODE_NO_ROOT: the mesh STA is not a root mesh STA (default) - * @RTW_IEEE80211_ROOTMODE_ROOT: the mesh STA is a root mesh STA if greater than - * this value - * @RTW_IEEE80211_PROACTIVE_PREQ_NO_PREP: the mesh STA is a root mesh STA supports - * the proactive PREQ with proactive PREP subfield set to 0 - * @RTW_IEEE80211_PROACTIVE_PREQ_WITH_PREP: the mesh STA is a root mesh STA - * supports the proactive PREQ with proactive PREP subfield set to 1 - * @RTW_IEEE80211_PROACTIVE_RANN: the mesh STA is a root mesh STA supports - * the proactive RANN - */ -enum rtw_ieee80211_root_mode_identifier { - RTW_IEEE80211_ROOTMODE_NO_ROOT = 0, - RTW_IEEE80211_ROOTMODE_ROOT = 1, - RTW_IEEE80211_PROACTIVE_PREQ_NO_PREP = 2, - RTW_IEEE80211_PROACTIVE_PREQ_WITH_PREP = 3, - RTW_IEEE80211_PROACTIVE_RANN = 4, -}; -/** - * enum rtw_ieee80211_channel_flags - channel flags - * - * Channel flags set by the regulatory control code. - * - * @RTW_IEEE80211_CHAN_DISABLED: This channel is disabled. - * @RTW_IEEE80211_CHAN_PASSIVE_SCAN: Only passive scanning is permitted - * on this channel. - * @RTW_IEEE80211_CHAN_NO_IBSS: IBSS is not allowed on this channel. - * @RTW_IEEE80211_CHAN_RADAR: Radar detection is required on this channel. - * @RTW_IEEE80211_CHAN_NO_HT40PLUS: extension channel above this channel - * is not permitted. - * @RTW_IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel - * is not permitted. - */ -enum rtw_ieee80211_channel_flags { - RTW_IEEE80211_CHAN_DISABLED = 1 << 0, - RTW_IEEE80211_CHAN_PASSIVE_SCAN = 1 << 1, - RTW_IEEE80211_CHAN_NO_IBSS = 1 << 2, - RTW_IEEE80211_CHAN_RADAR = 1 << 3, - RTW_IEEE80211_CHAN_NO_HT40PLUS = 1 << 4, - RTW_IEEE80211_CHAN_NO_HT40MINUS = 1 << 5, -}; - -#define RTW_IEEE80211_CHAN_NO_HT40 \ - (RTW_IEEE80211_CHAN_NO_HT40PLUS | RTW_IEEE80211_CHAN_NO_HT40MINUS) +/* for kernel 3.14 , both value are changed to IEEE80211_CHAN_NO_IR*/ +#define RTW_IEEE80211_CHAN_NO_IBSS (1 << 2) +#define RTW_IEEE80211_CHAN_PASSIVE_SCAN (1 << 1) /* Represent channel details, subset of ieee80211_channel */ struct rtw_ieee80211_channel { diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 453c944..05b2a8e 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -8030,9 +8030,9 @@ static void rtw_cfg80211_mesh_cfg_set(_adapter *adapter, const struct mesh_confi mcfg->dot11MeshGateAnnouncementProtocol = conf->dot11MeshGateAnnouncementProtocol; /* our current gate annc implementation rides on root annc with gate annc bit in PREQ flags */ if (mcfg->dot11MeshGateAnnouncementProtocol - && mcfg->dot11MeshHWMPRootMode <= RTW_IEEE80211_ROOTMODE_ROOT + && mcfg->dot11MeshHWMPRootMode <= IEEE80211_ROOTMODE_ROOT ) { - mcfg->dot11MeshHWMPRootMode = RTW_IEEE80211_PROACTIVE_RANN; + mcfg->dot11MeshHWMPRootMode = IEEE80211_PROACTIVE_RANN; RTW_INFO(ADPT_FMT" enable PROACTIVE_RANN becaue gate annc is needed\n", ADPT_ARG(adapter)); } if (chk_mesh_attr(NL80211_MESHCONF_HWMP_RANN_INTERVAL, mask))