Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185070
b: refs/heads/master
c: bc9d24a
h: refs/heads/master
v: v3
  • Loading branch information
Alan Jenkins authored and Corentin Chary committed Feb 28, 2010
1 parent 47e9ccd commit 1baab6b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ced69c59811f05b2f8378467cbb82ac6ed3c6a5a
refs/heads/master: bc9d24a3aeb1532fc3e234907a8b6d671f7ed68f
18 changes: 18 additions & 0 deletions trunk/drivers/platform/x86/eeepc-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,8 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc)
struct pci_dev *dev;
struct pci_bus *bus;
bool blocked = eeepc_wlan_rfkill_blocked(eeepc);
bool absent;
u32 l;

if (eeepc->wlan_rfkill)
rfkill_set_sw_state(eeepc->wlan_rfkill, blocked);
Expand All @@ -591,6 +593,22 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc)
goto out_unlock;
}

if (pci_bus_read_config_dword(bus, 0, PCI_VENDOR_ID, &l)) {
pr_err("Unable to read PCI config space?\n");
goto out_unlock;
}
absent = (l == 0xffffffff);

if (blocked != absent) {
pr_warning("BIOS says wireless lan is %s, "
"but the pci device is %s\n",
blocked ? "blocked" : "unblocked",
absent ? "absent" : "present");
pr_warning("skipped wireless hotplug as probably "
"inappropriate for this model\n");
goto out_unlock;
}

if (!blocked) {
dev = pci_get_slot(bus, 0);
if (dev) {
Expand Down

0 comments on commit 1baab6b

Please sign in to comment.