wl1251: use mac80211 provided channel parameters in scanning

The number of channels to be used in scan was hard coded in wl1251. The
proper way is to use the channels array provided by mac80211.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.c b/drivers/net/wireless/wl12xx/wl1251_cmd.c
index fcbfbd7..0320b47 100644
--- a/drivers/net/wireless/wl12xx/wl1251_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1251_cmd.c
@@ -412,6 +412,7 @@
 }
 
 int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len,
+		    struct ieee80211_channel *channels[],
 		    unsigned int n_channels, unsigned int n_probes)
 {
 	struct wl1251_cmd_scan *cmd;
@@ -442,7 +443,7 @@
 		memset(&cmd->channels[i].bssid_msb, 0xff, 2);
 		cmd->channels[i].early_termination = 0;
 		cmd->channels[i].tx_power_att = 0;
-		cmd->channels[i].channel = i + 1;
+		cmd->channels[i].channel = channels[i]->hw_value;
 	}
 
 	cmd->params.ssid_len = ssid_len;