diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
commit | 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch) | |
tree | 454d1842b1833d976da62abcbd5c47521ebe9bd7 /net/mac80211/mesh_plink.c | |
parent | 54a696bd07c14d3b1192d03ce7269bc59b45209a (diff) | |
parent | eb56092fc168bf5af199d47af50c0d84a96db898 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
net: Allow dependancies of FDDI & Tokenring to be modular.
igb: Fix build warning when DCA is disabled.
net: Fix warning fallout from recent NAPI interface changes.
gro: Fix potential use after free
sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
sfc: When disabling the NIC, close the device rather than unregistering it
sfc: SFT9001: Add cable diagnostics
sfc: Add support for multiple PHY self-tests
sfc: Merge top-level functions for self-tests
sfc: Clean up PHY mode management in loopback self-test
sfc: Fix unreliable link detection in some loopback modes
sfc: Generate unique names for per-NIC workqueues
802.3ad: use standard ethhdr instead of ad_header
802.3ad: generalize out mac address initializer
802.3ad: initialize ports LACPDU from const initializer
802.3ad: remove typedef around ad_system
802.3ad: turn ports is_individual into a bool
802.3ad: turn ports is_enabled into a bool
802.3ad: make ntt bool
ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
...
Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r-- | net/mac80211/mesh_plink.c | 49 |
1 files changed, 16 insertions, 33 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index faac101c0f85..929ba542fd72 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -257,9 +257,6 @@ static void mesh_plink_timer(unsigned long data) | |||
257 | struct sta_info *sta; | 257 | struct sta_info *sta; |
258 | __le16 llid, plid, reason; | 258 | __le16 llid, plid, reason; |
259 | struct ieee80211_sub_if_data *sdata; | 259 | struct ieee80211_sub_if_data *sdata; |
260 | #ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG | ||
261 | DECLARE_MAC_BUF(mac); | ||
262 | #endif | ||
263 | 260 | ||
264 | /* | 261 | /* |
265 | * This STA is valid because sta_info_destroy() will | 262 | * This STA is valid because sta_info_destroy() will |
@@ -274,8 +271,8 @@ static void mesh_plink_timer(unsigned long data) | |||
274 | spin_unlock_bh(&sta->lock); | 271 | spin_unlock_bh(&sta->lock); |
275 | return; | 272 | return; |
276 | } | 273 | } |
277 | mpl_dbg("Mesh plink timer for %s fired on state %d\n", | 274 | mpl_dbg("Mesh plink timer for %pM fired on state %d\n", |
278 | print_mac(mac, sta->sta.addr), sta->plink_state); | 275 | sta->sta.addr, sta->plink_state); |
279 | reason = 0; | 276 | reason = 0; |
280 | llid = sta->llid; | 277 | llid = sta->llid; |
281 | plid = sta->plid; | 278 | plid = sta->plid; |
@@ -287,9 +284,9 @@ static void mesh_plink_timer(unsigned long data) | |||
287 | /* retry timer */ | 284 | /* retry timer */ |
288 | if (sta->plink_retries < dot11MeshMaxRetries(sdata)) { | 285 | if (sta->plink_retries < dot11MeshMaxRetries(sdata)) { |
289 | u32 rand; | 286 | u32 rand; |
290 | mpl_dbg("Mesh plink for %s (retry, timeout): %d %d\n", | 287 | mpl_dbg("Mesh plink for %pM (retry, timeout): %d %d\n", |
291 | print_mac(mac, sta->sta.addr), | 288 | sta->sta.addr, sta->plink_retries, |
292 | sta->plink_retries, sta->plink_timeout); | 289 | sta->plink_timeout); |
293 | get_random_bytes(&rand, sizeof(u32)); | 290 | get_random_bytes(&rand, sizeof(u32)); |
294 | sta->plink_timeout = sta->plink_timeout + | 291 | sta->plink_timeout = sta->plink_timeout + |
295 | rand % sta->plink_timeout; | 292 | rand % sta->plink_timeout; |
@@ -337,9 +334,6 @@ int mesh_plink_open(struct sta_info *sta) | |||
337 | { | 334 | { |
338 | __le16 llid; | 335 | __le16 llid; |
339 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 336 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
340 | #ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG | ||
341 | DECLARE_MAC_BUF(mac); | ||
342 | #endif | ||
343 | 337 | ||
344 | spin_lock_bh(&sta->lock); | 338 | spin_lock_bh(&sta->lock); |
345 | get_random_bytes(&llid, 2); | 339 | get_random_bytes(&llid, 2); |
@@ -351,8 +345,8 @@ int mesh_plink_open(struct sta_info *sta) | |||
351 | sta->plink_state = PLINK_OPN_SNT; | 345 | sta->plink_state = PLINK_OPN_SNT; |
352 | mesh_plink_timer_set(sta, dot11MeshRetryTimeout(sdata)); | 346 | mesh_plink_timer_set(sta, dot11MeshRetryTimeout(sdata)); |
353 | spin_unlock_bh(&sta->lock); | 347 | spin_unlock_bh(&sta->lock); |
354 | mpl_dbg("Mesh plink: starting establishment with %s\n", | 348 | mpl_dbg("Mesh plink: starting establishment with %pM\n", |
355 | print_mac(mac, sta->sta.addr)); | 349 | sta->sta.addr); |
356 | 350 | ||
357 | return mesh_plink_frame_tx(sdata, PLINK_OPEN, | 351 | return mesh_plink_frame_tx(sdata, PLINK_OPEN, |
358 | sta->sta.addr, llid, 0, 0); | 352 | sta->sta.addr, llid, 0, 0); |
@@ -360,10 +354,6 @@ int mesh_plink_open(struct sta_info *sta) | |||
360 | 354 | ||
361 | void mesh_plink_block(struct sta_info *sta) | 355 | void mesh_plink_block(struct sta_info *sta) |
362 | { | 356 | { |
363 | #ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG | ||
364 | DECLARE_MAC_BUF(mac); | ||
365 | #endif | ||
366 | |||
367 | spin_lock_bh(&sta->lock); | 357 | spin_lock_bh(&sta->lock); |
368 | __mesh_plink_deactivate(sta); | 358 | __mesh_plink_deactivate(sta); |
369 | sta->plink_state = PLINK_BLOCKED; | 359 | sta->plink_state = PLINK_BLOCKED; |
@@ -374,12 +364,8 @@ int mesh_plink_close(struct sta_info *sta) | |||
374 | { | 364 | { |
375 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 365 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
376 | __le16 llid, plid, reason; | 366 | __le16 llid, plid, reason; |
377 | #ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG | ||
378 | DECLARE_MAC_BUF(mac); | ||
379 | #endif | ||
380 | 367 | ||
381 | mpl_dbg("Mesh plink: closing link with %s\n", | 368 | mpl_dbg("Mesh plink: closing link with %pM\n", sta->sta.addr); |
382 | print_mac(mac, sta->sta.addr)); | ||
383 | spin_lock_bh(&sta->lock); | 369 | spin_lock_bh(&sta->lock); |
384 | sta->reason = cpu_to_le16(MESH_LINK_CANCELLED); | 370 | sta->reason = cpu_to_le16(MESH_LINK_CANCELLED); |
385 | reason = sta->reason; | 371 | reason = sta->reason; |
@@ -417,9 +403,6 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
417 | u8 ie_len; | 403 | u8 ie_len; |
418 | u8 *baseaddr; | 404 | u8 *baseaddr; |
419 | __le16 plid, llid, reason; | 405 | __le16 plid, llid, reason; |
420 | #ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG | ||
421 | DECLARE_MAC_BUF(mac); | ||
422 | #endif | ||
423 | 406 | ||
424 | /* need action_code, aux */ | 407 | /* need action_code, aux */ |
425 | if (len < IEEE80211_MIN_ACTION_SIZE + 3) | 408 | if (len < IEEE80211_MIN_ACTION_SIZE + 3) |
@@ -557,10 +540,10 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
557 | } | 540 | } |
558 | } | 541 | } |
559 | 542 | ||
560 | mpl_dbg("Mesh plink (peer, state, llid, plid, event): %s %d %d %d %d\n", | 543 | mpl_dbg("Mesh plink (peer, state, llid, plid, event): %pM %d %d %d %d\n", |
561 | print_mac(mac, mgmt->sa), sta->plink_state, | 544 | mgmt->sa, sta->plink_state, |
562 | le16_to_cpu(sta->llid), le16_to_cpu(sta->plid), | 545 | le16_to_cpu(sta->llid), le16_to_cpu(sta->plid), |
563 | event); | 546 | event); |
564 | reason = 0; | 547 | reason = 0; |
565 | switch (sta->plink_state) { | 548 | switch (sta->plink_state) { |
566 | /* spin_unlock as soon as state is updated at each case */ | 549 | /* spin_unlock as soon as state is updated at each case */ |
@@ -660,8 +643,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
660 | sta->plink_state = PLINK_ESTAB; | 643 | sta->plink_state = PLINK_ESTAB; |
661 | mesh_plink_inc_estab_count(sdata); | 644 | mesh_plink_inc_estab_count(sdata); |
662 | spin_unlock_bh(&sta->lock); | 645 | spin_unlock_bh(&sta->lock); |
663 | mpl_dbg("Mesh plink with %s ESTABLISHED\n", | 646 | mpl_dbg("Mesh plink with %pM ESTABLISHED\n", |
664 | print_mac(mac, sta->sta.addr)); | 647 | sta->sta.addr); |
665 | break; | 648 | break; |
666 | default: | 649 | default: |
667 | spin_unlock_bh(&sta->lock); | 650 | spin_unlock_bh(&sta->lock); |
@@ -693,8 +676,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
693 | sta->plink_state = PLINK_ESTAB; | 676 | sta->plink_state = PLINK_ESTAB; |
694 | mesh_plink_inc_estab_count(sdata); | 677 | mesh_plink_inc_estab_count(sdata); |
695 | spin_unlock_bh(&sta->lock); | 678 | spin_unlock_bh(&sta->lock); |
696 | mpl_dbg("Mesh plink with %s ESTABLISHED\n", | 679 | mpl_dbg("Mesh plink with %pM ESTABLISHED\n", |
697 | print_mac(mac, sta->sta.addr)); | 680 | sta->sta.addr); |
698 | mesh_plink_frame_tx(sdata, PLINK_CONFIRM, sta->sta.addr, llid, | 681 | mesh_plink_frame_tx(sdata, PLINK_CONFIRM, sta->sta.addr, llid, |
699 | plid, 0); | 682 | plid, 0); |
700 | break; | 683 | break; |