aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-27 07:18:36 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-03 07:50:34 -0400
commita1845fc7c552977e23fe552ad3f5c6c279e3d550 (patch)
tree6d2789387757141044dbbaf3c361bcc58809aa13 /net/mac80211/mlme.c
parent1b083ea4c072e49a6b0d4a1a6d5d9a6e4b3606b1 (diff)
mac80211: add TX prepare API
Some drivers require setup before being able to send management frames in managed mode, in particular in multi-channel cases. Introduce API to allow the drivers to do such setup while being able to sleep waiting for the setup to finish in the device. This isn't possible inside the TX call since that can't sleep. A future patch may also restructure the TX retry to wait for the driver to report the frame status, as suggested by Arik in http://mid.gmane.org/CA+XVXffKSEL6ZQPQ98x-zO-NL2=TNF1uN==mprRyUmAaRn254g@mail.gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index e9c0d1b68fc8..d563f7c55531 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -541,6 +541,8 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
541 memcpy(pos, assoc_data->ie + offset, noffset - offset); 541 memcpy(pos, assoc_data->ie + offset, noffset - offset);
542 } 542 }
543 543
544 drv_mgd_prepare_tx(local, sdata);
545
544 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; 546 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
545 ieee80211_tx_skb(sdata, skb); 547 ieee80211_tx_skb(sdata, skb);
546} 548}
@@ -580,6 +582,9 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
580 if (!(ifmgd->flags & IEEE80211_STA_MFP_ENABLED)) 582 if (!(ifmgd->flags & IEEE80211_STA_MFP_ENABLED))
581 IEEE80211_SKB_CB(skb)->flags |= 583 IEEE80211_SKB_CB(skb)->flags |=
582 IEEE80211_TX_INTFL_DONT_ENCRYPT; 584 IEEE80211_TX_INTFL_DONT_ENCRYPT;
585
586 drv_mgd_prepare_tx(local, sdata);
587
583 ieee80211_tx_skb(sdata, skb); 588 ieee80211_tx_skb(sdata, skb);
584 } 589 }
585} 590}
@@ -1756,6 +1761,7 @@ static void ieee80211_auth_challenge(struct ieee80211_sub_if_data *sdata,
1756 if (!elems.challenge) 1761 if (!elems.challenge)
1757 return; 1762 return;
1758 auth_data->expected_transaction = 4; 1763 auth_data->expected_transaction = 4;
1764 drv_mgd_prepare_tx(sdata->local, sdata);
1759 ieee80211_send_auth(sdata, 3, auth_data->algorithm, 1765 ieee80211_send_auth(sdata, 3, auth_data->algorithm,
1760 elems.challenge - 2, elems.challenge_len + 2, 1766 elems.challenge - 2, elems.challenge_len + 2,
1761 auth_data->bss->bssid, auth_data->bss->bssid, 1767 auth_data->bss->bssid, auth_data->bss->bssid,
@@ -2641,6 +2647,8 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata)
2641 return -ETIMEDOUT; 2647 return -ETIMEDOUT;
2642 } 2648 }
2643 2649
2650 drv_mgd_prepare_tx(local, sdata);
2651
2644 if (auth_data->bss->proberesp_ies) { 2652 if (auth_data->bss->proberesp_ies) {
2645 sdata_info(sdata, "send auth to %pM (try %d/%d)\n", 2653 sdata_info(sdata, "send auth to %pM (try %d/%d)\n",
2646 auth_data->bss->bssid, auth_data->tries, 2654 auth_data->bss->bssid, auth_data->tries,