|
@@ -345,9 +345,9 @@ static void rtl_op_remove_interface(struct ieee80211_hw *hw,
|
|
|
mutex_lock(&rtlpriv->locks.conf_mutex);
|
|
|
|
|
|
/* Free beacon resources */
|
|
|
- if ((vif->type == NL80211_IFTYPE_AP) ||
|
|
|
- (vif->type == NL80211_IFTYPE_ADHOC) ||
|
|
|
- (vif->type == NL80211_IFTYPE_MESH_POINT)) {
|
|
|
+ if (vif->type == NL80211_IFTYPE_AP ||
|
|
|
+ vif->type == NL80211_IFTYPE_ADHOC ||
|
|
|
+ vif->type == NL80211_IFTYPE_MESH_POINT) {
|
|
|
if (mac->beacon_enabled == 1) {
|
|
|
mac->beacon_enabled = 0;
|
|
|
rtlpriv->cfg->ops->update_interrupt_mask(hw, 0,
|
|
@@ -858,8 +858,8 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
|
|
|
* here just used for linked scanning, & linked
|
|
|
* and nolink check bssid is set in set network_type
|
|
|
*/
|
|
|
- if ((changed_flags & FIF_BCN_PRBRESP_PROMISC) &&
|
|
|
- (mac->link_state >= MAC80211_LINKED)) {
|
|
|
+ if (changed_flags & FIF_BCN_PRBRESP_PROMISC &&
|
|
|
+ mac->link_state >= MAC80211_LINKED) {
|
|
|
if (mac->opmode != NL80211_IFTYPE_AP &&
|
|
|
mac->opmode != NL80211_IFTYPE_MESH_POINT) {
|
|
|
if (*new_flags & FIF_BCN_PRBRESP_PROMISC)
|
|
@@ -1044,10 +1044,10 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
|
|
|
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
|
|
|
|
|
|
mutex_lock(&rtlpriv->locks.conf_mutex);
|
|
|
- if ((vif->type == NL80211_IFTYPE_ADHOC) ||
|
|
|
- (vif->type == NL80211_IFTYPE_AP) ||
|
|
|
- (vif->type == NL80211_IFTYPE_MESH_POINT)) {
|
|
|
- if ((changed & BSS_CHANGED_BEACON) ||
|
|
|
+ if (vif->type == NL80211_IFTYPE_ADHOC ||
|
|
|
+ vif->type == NL80211_IFTYPE_AP ||
|
|
|
+ vif->type == NL80211_IFTYPE_MESH_POINT) {
|
|
|
+ if (changed & BSS_CHANGED_BEACON ||
|
|
|
(changed & BSS_CHANGED_BEACON_ENABLED &&
|
|
|
bss_conf->enable_beacon)) {
|
|
|
if (mac->beacon_enabled == 0) {
|
|
@@ -1513,9 +1513,9 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
|
|
return -ENOSPC; /*User disabled HW-crypto */
|
|
|
}
|
|
|
/* To support IBSS, use sw-crypto for GTK */
|
|
|
- if (((vif->type == NL80211_IFTYPE_ADHOC) ||
|
|
|
- (vif->type == NL80211_IFTYPE_MESH_POINT)) &&
|
|
|
- !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
|
|
|
+ if ((vif->type == NL80211_IFTYPE_ADHOC ||
|
|
|
+ vif->type == NL80211_IFTYPE_MESH_POINT) &&
|
|
|
+ !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
|
|
|
return -ENOSPC;
|
|
|
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
|
|
|
"%s hardware based encryption for keyidx: %d, mac: %pM\n",
|
|
@@ -1588,7 +1588,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
|
|
rtlpriv->cfg->ops->enable_hw_sec(hw);
|
|
|
}
|
|
|
} else {
|
|
|
- if ((!group_key) || (vif->type == NL80211_IFTYPE_ADHOC) ||
|
|
|
+ if (!group_key || vif->type == NL80211_IFTYPE_ADHOC ||
|
|
|
rtlpriv->sec.pairwise_enc_algorithm == NO_ENCRYPTION) {
|
|
|
if (rtlpriv->sec.pairwise_enc_algorithm ==
|
|
|
NO_ENCRYPTION &&
|