linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: mesh: Remove un-needed defines
@ 2012-04-26 20:41 Andrei Emeltchenko
  2012-04-26 21:41 ` Thomas Pedersen
  0 siblings, 1 reply; 4+ messages in thread
From: Andrei Emeltchenko @ 2012-04-26 20:41 UTC (permalink / raw)
  To: linux-wireless

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

ieee80211_vif_is_mesh is already defined as:

<------8<--------------------------------------------------------------
|  static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
|  {
|  #ifdef CONFIG_MAC80211_MESH
|          return vif->type == NL80211_IFTYPE_MESH_POINT;
|  #endif
|          return false;
|  }
|
<------8<--------------------------------------------------------------

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
 net/mac80211/cfg.c      |    4 ----
 net/mac80211/rx.c       |    2 --
 net/mac80211/sta_info.c |    4 ----
 3 files changed, 10 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 677d659..72da59d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -404,7 +404,6 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
 	rate_idx_to_bitrate(&sinfo->rxrate, sta, sta->last_rx_rate_idx);
 
 	if (ieee80211_vif_is_mesh(&sdata->vif)) {
-#ifdef CONFIG_MAC80211_MESH
 		sinfo->filled |= STATION_INFO_LLID |
 				 STATION_INFO_PLID |
 				 STATION_INFO_PLINK_STATE;
@@ -412,7 +411,6 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
 		sinfo->llid = le16_to_cpu(sta->llid);
 		sinfo->plid = le16_to_cpu(sta->plid);
 		sinfo->plink_state = sta->plink_state;
-#endif
 	}
 
 	sinfo->bss_param.flags = 0;
@@ -862,7 +860,6 @@ static int sta_apply_parameters(struct ieee80211_local *local,
 						  &sta->sta.ht_cap);
 
 	if (ieee80211_vif_is_mesh(&sdata->vif)) {
-#ifdef CONFIG_MAC80211_MESH
 		if (sdata->u.mesh.security & IEEE80211_MESH_SEC_SECURED)
 			switch (params->plink_state) {
 			case NL80211_PLINK_LISTEN:
@@ -883,7 +880,6 @@ static int sta_apply_parameters(struct ieee80211_local *local,
 				mesh_plink_block(sta);
 				break;
 			}
-#endif
 	}
 
 	return 0;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 760d20c..aabdfe7 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2683,10 +2683,8 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx)
 		CALL_RXH(ieee80211_rx_h_defragment)
 		CALL_RXH(ieee80211_rx_h_michael_mic_verify)
 		/* must be after MMIC verify so header is counted in MPDU mic */
-#ifdef CONFIG_MAC80211_MESH
 		if (ieee80211_vif_is_mesh(&rx->sdata->vif))
 			CALL_RXH(ieee80211_rx_h_mesh_fwding);
-#endif
 		CALL_RXH(ieee80211_rx_h_amsdu)
 		CALL_RXH(ieee80211_rx_h_data)
 		CALL_RXH(ieee80211_rx_h_ctrl);
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 38137cb..af85631 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -742,10 +742,8 @@ int __must_check __sta_info_destroy(struct sta_info *sta)
 		__skb_queue_purge(&sta->tx_filtered[ac]);
 	}
 
-#ifdef CONFIG_MAC80211_MESH
 	if (ieee80211_vif_is_mesh(&sdata->vif))
 		mesh_accept_plinks_update(sdata);
-#endif
 
 #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
 	wiphy_debug(local->hw.wiphy, "Removed STA %pM\n", sta->sta.addr);
@@ -757,12 +755,10 @@ int __must_check __sta_info_destroy(struct sta_info *sta)
 	rate_control_remove_sta_debugfs(sta);
 	ieee80211_sta_debugfs_remove(sta);
 
-#ifdef CONFIG_MAC80211_MESH
 	if (ieee80211_vif_is_mesh(&sta->sdata->vif)) {
 		mesh_plink_deactivate(sta);
 		del_timer_sync(&sta->plink_timer);
 	}
-#endif
 
 	/*
 	 * Destroy aggregation state here. It would be nice to wait for the
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mac80211: mesh: Remove un-needed defines
  2012-04-26 20:41 [PATCH] mac80211: mesh: Remove un-needed defines Andrei Emeltchenko
@ 2012-04-26 21:41 ` Thomas Pedersen
  2012-05-02 18:12   ` John W. Linville
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Pedersen @ 2012-04-26 21:41 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-wireless

Hi Andrei,

On Thu, Apr 26, 2012 at 1:41 PM, Andrei Emeltchenko
<Andrei.Emeltchenko.news@gmail.com> wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> ieee80211_vif_is_mesh is already defined as:
>
> <------8<--------------------------------------------------------------
> |  static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
> |  {
> |  #ifdef CONFIG_MAC80211_MESH
> |          return vif->type == NL80211_IFTYPE_MESH_POINT;
> |  #endif
> |          return false;
> |  }
> |
> <------8<--------------------------------------------------------------
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com

ACK if you tested w/o CONFIG_MAC80211_MESH.

Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mac80211: mesh: Remove un-needed defines
  2012-04-26 21:41 ` Thomas Pedersen
@ 2012-05-02 18:12   ` John W. Linville
  2012-05-02 19:04     ` Thomas Pedersen
  0 siblings, 1 reply; 4+ messages in thread
From: John W. Linville @ 2012-05-02 18:12 UTC (permalink / raw)
  To: Thomas Pedersen; +Cc: Andrei Emeltchenko, linux-wireless

On Thu, Apr 26, 2012 at 02:41:32PM -0700, Thomas Pedersen wrote:
> Hi Andrei,
> 
> On Thu, Apr 26, 2012 at 1:41 PM, Andrei Emeltchenko
> <Andrei.Emeltchenko.news@gmail.com> wrote:
> > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> >
> > ieee80211_vif_is_mesh is already defined as:
> >
> > <------8<--------------------------------------------------------------
> > |  static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
> > |  {
> > |  #ifdef CONFIG_MAC80211_MESH
> > |          return vif->type == NL80211_IFTYPE_MESH_POINT;
> > |  #endif
> > |          return false;
> > |  }
> > |
> > <------8<--------------------------------------------------------------
> >
> > Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com
> 
> ACK if you tested w/o CONFIG_MAC80211_MESH.

Well...did you??

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mac80211: mesh: Remove un-needed defines
  2012-05-02 18:12   ` John W. Linville
@ 2012-05-02 19:04     ` Thomas Pedersen
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Pedersen @ 2012-05-02 19:04 UTC (permalink / raw)
  To: John W. Linville; +Cc: Andrei Emeltchenko, linux-wireless

On Wed, May 2, 2012 at 11:12 AM, John W. Linville
<linville@tuxdriver.com> wrote:
> On Thu, Apr 26, 2012 at 02:41:32PM -0700, Thomas Pedersen wrote:
>> Hi Andrei,
>>
>> On Thu, Apr 26, 2012 at 1:41 PM, Andrei Emeltchenko
>> <Andrei.Emeltchenko.news@gmail.com> wrote:
>> > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>> >
>> > ieee80211_vif_is_mesh is already defined as:
>> >
>> > <------8<--------------------------------------------------------------
>> > |  static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
>> > |  {
>> > |  #ifdef CONFIG_MAC80211_MESH
>> > |          return vif->type == NL80211_IFTYPE_MESH_POINT;
>> > |  #endif
>> > |          return false;
>> > |  }
>> > |
>> > <------8<--------------------------------------------------------------
>> >
>> > Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com
>>
>> ACK if you tested w/o CONFIG_MAC80211_MESH.
>
> Well...did you??

He dropped the list in his final response. No, it doesn't work.

Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-02 19:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-26 20:41 [PATCH] mac80211: mesh: Remove un-needed defines Andrei Emeltchenko
2012-04-26 21:41 ` Thomas Pedersen
2012-05-02 18:12   ` John W. Linville
2012-05-02 19:04     ` Thomas Pedersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).