Skip to content

Commit

Permalink
mac80211: Do not check for valid hw_queues for P2P_DEVICE
Browse files Browse the repository at this point in the history
A P2P Device interface does not have a netdev, and is not
expected to be used for transmitting data, so there is no
need to assign hw queues for it.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Ilan Peer authored and Johannes Berg committed Sep 4, 2012
1 parent aba4e6f commit 0ef24e5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,15 @@ static int ieee80211_check_queues(struct ieee80211_sub_if_data *sdata)
int n_queues = sdata->local->hw.queues;
int i;

for (i = 0; i < IEEE80211_NUM_ACS; i++) {
if (WARN_ON_ONCE(sdata->vif.hw_queue[i] ==
IEEE80211_INVAL_HW_QUEUE))
return -EINVAL;
if (WARN_ON_ONCE(sdata->vif.hw_queue[i] >=
n_queues))
return -EINVAL;
if (sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE) {
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
if (WARN_ON_ONCE(sdata->vif.hw_queue[i] ==
IEEE80211_INVAL_HW_QUEUE))
return -EINVAL;
if (WARN_ON_ONCE(sdata->vif.hw_queue[i] >=
n_queues))
return -EINVAL;
}
}

if ((sdata->vif.type != NL80211_IFTYPE_AP) ||
Expand Down

0 comments on commit 0ef24e5

Please sign in to comment.