Using mmc standard api to get the host sg capability. Signed-off-by: Xinming Hu <huxm@xxxxxxxxxxx> --- v6: separate driver patch from patch 1/4. --- drivers/net/wireless/ath/ath6kl/sdio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index 2195b1b..3217698 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c @@ -734,17 +734,18 @@ static int ath6kl_sdio_enable_scatter(struct ath6kl *ar) struct htc_target *target = ar->htc_target; int ret = 0; bool virt_scat = false; + unsigned short max_segs = 0; if (ar_sdio->scatter_enabled) return 0; ar_sdio->scatter_enabled = true; + max_segs = sdio_get_host_max_seg_count(ar_sdio->func); /* check if host supports scatter and it meets our requirements */ - if (ar_sdio->func->card->host->max_segs < MAX_SCATTER_ENTRIES_PER_REQ) { + if (max_segs < MAX_SCATTER_ENTRIES_PER_REQ) { ath6kl_err("host only supports scatter of :%d entries, need: %d\n", - ar_sdio->func->card->host->max_segs, - MAX_SCATTER_ENTRIES_PER_REQ); + max_segs, MAX_SCATTER_ENTRIES_PER_REQ); virt_scat = true; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html