Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213960
b: refs/heads/master
c: c61029c
h: refs/heads/master
v: v3
  • Loading branch information
John W. Linville committed Aug 16, 2010
1 parent 2437d06 commit 4cb30f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31a5cddaaed9c04ef653e3c2900cfb5a646fe686
refs/heads/master: c61029c77fb68d7a182c0ae010f0f9dcae4e196c
16 changes: 7 additions & 9 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/random.h>
#include <linux/ctype.h>
#include <linux/nl80211.h>
#include <linux/platform_device.h>
#include <net/cfg80211.h>
Expand Down Expand Up @@ -181,14 +182,6 @@ static bool is_alpha2_set(const char *alpha2)
return false;
}

static bool is_alpha_upper(char letter)
{
/* ASCII A - Z */
if (letter >= 65 && letter <= 90)
return true;
return false;
}

static bool is_unknown_alpha2(const char *alpha2)
{
if (!alpha2)
Expand Down Expand Up @@ -220,7 +213,7 @@ static bool is_an_alpha2(const char *alpha2)
{
if (!alpha2)
return false;
if (is_alpha_upper(alpha2[0]) && is_alpha_upper(alpha2[1]))
if (isalpha(alpha2[0]) && isalpha(alpha2[1]))
return true;
return false;
}
Expand Down Expand Up @@ -1399,6 +1392,11 @@ static DECLARE_WORK(reg_work, reg_todo);

static void queue_regulatory_request(struct regulatory_request *request)
{
if (isalpha(request->alpha2[0]))
request->alpha2[0] = toupper(request->alpha2[0]);
if (isalpha(request->alpha2[1]))
request->alpha2[1] = toupper(request->alpha2[1]);

spin_lock(&reg_requests_lock);
list_add_tail(&request->list, &reg_requests_list);
spin_unlock(&reg_requests_lock);
Expand Down

0 comments on commit 4cb30f5

Please sign in to comment.